A Heroku plugin for Gradle.
Groovy Shell
Switch branches/tags
Nothing to show
Latest commit 72f57dc Apr 10, 2014 @marc0der Merge pull request #1 from sheehan/patch-1
Updates setup docs in README.
Failed to load latest commit information.
src Change package from org.ratpackframework.gradle to com.wiredforcode. Mar 25, 2014
.gitignore Ignore classes folder. Jan 31, 2014
README.md update classpath. Apr 7, 2014
build.gradle Up version to 1.0.0, fixes dodgy source jar. Mar 25, 2014


##Heroku Plugin for Gradle

This Gradle plugin allows for the administration and deployment of your Heroku application from the comfort of your Gradle project.

It allows you to create, destroy or deploy apps. It also allows you to view the application info or get a list of apps.

In order to use the plugin, update your build.gradle file with the following config:

buildscript {
    repositories {
        mavenRepo name: 'Bintray Gradle Plugins', url: 'http://dl.bintray.com/vermeulen-mp/gradle-plugins'
    dependencies {
        classpath 'com.wiredforcode:gradle-heroku-plugin:1.0.0'

apply plugin: 'heroku'


heroku {
    appName = 'some-unique-app-name'

    //get this from heroku
    apiKey = 'my-api-key'

The default buildpack used on app creation will be the one found at: https://github.com/marcoVermeulen/heroku-buildpack-gradlew.git

Overriding this default is as easy as adding an additional line to the heroku block:

heroku {
    buildpack = 'https://github.com/someaccount/heroku-buildpack-xxx.git'

Next, you will need to add a Procfile to the root of your project. It contains the following, including a crucial line that bootstraps your application, in this case a fat jar with java.

  web: java -jar -Dport=$PORT build/libs/my-fat.jar

We can now invoke the following tasks:

# provision the named app on heroku
$ gradle herokuAppCreate

# deploy the named app on heroku
$ gradle herokuAppDeploy

# destroy the named app on heroku
$ gradle herokuAppDestroy

# get app info of the app on heroku
$ gradle herokuAppInfo

# get list of apps on heroku
$ gradle herokuAppList

If you really really need to:

# install the buildpack artifacts locally into the project
$ gradle herokuBuildpack