Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A Heroku plugin for Gradle.
Groovy Shell
branch: master

Merge pull request #1 from sheehan/patch-1

Updates setup docs in README.

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: ''
    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:

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

heroku {
    buildpack = ''

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
Something went wrong with that request. Please try again.