• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

heroku/heroku-gradle: A Gradle plugin for deploying JAR and WAR files to Heroku.

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

heroku/heroku-gradle

开源软件地址(OpenSource Url):

https://github.com/heroku/heroku-gradle

开源编程语言(OpenSource Language):

Java 57.1%

开源软件介绍(OpenSource Introduction):

Heroku Gradle Plugin

This plugin is used to deploy Gradle based JVM applications directly to Heroku without pushing to a Git repository. This can be useful when deploying from a CI server.

Using the Plugin

Add the plugin to your build.gradle:

plugins {
  id "com.heroku.sdk.heroku-gradle" version "2.0.0"
}

Create a Heroku app using the Heroku CLI:

$ heroku create

Build your application, and run the deployHeroku task:

$ ./gradlew build deployHeroku

Configuration

You can configure the heroku-gradle plugin by using the heroku directive in your build.gradle configuration.

You can configure your Heroku app name like this:

heroku {
  appName = "sushi"
}

You can include extra files like this:

heroku {
  includes = ["README.md"]
}

You can exclude all files except your fat-jar like this:

heroku {
  includes = ["build/libs/my-app.jar"]
  includeBuildDir = false
}

You can strip the path from the file paths (e.g. turning "foo/bar/build/foobar.tgz" into "foobar.tgz" ). This will default to project.rootDir (i.e. the root of all modules)

heroku {
  includeRootDir = project.buildDir
}

You can explicitly define the required jdk version (in system.properties)

heroku {
  jdkVersion = 11
}

You can customize the command used to run your app (in Procfile) like this:

heroku {
  processTypes(
      web: "java -jar build/libs/my-app.jar"
  )
}

Development

The heavy lifting for this plugin is done by the heroku-deploy library. The source code for that project can be found in the heroku-maven-plugin repository. If you need to update that library, do this:

$ git clone https://github.com/heroku/heroku-maven-plugin
$ cd heroku-maven-plugin/heroku-deploy
# make your changes
$ mvn clean install

Then update the heroku-deploy dependency version in the heroku-gradle build.gradle to 0.1.0 (or whatever version is specified in the heroku-deploy pom.xml). The next time you run the scripted tests it will pick up the snapshot version from your local Maven repository.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
turntabl/gradle-travis-sample发布时间:2022-06-14
下一篇:
johnrengelman/gradle-processes: Gradle Processes Plugin - Create and manage fork ...发布时间:2022-06-14
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap