GithubHelp home page GithubHelp logo

drmoeller / heroku-gradle Goto Github PK

View Code? Open in Web Editor NEW

This project forked from heroku/heroku-gradle-plugin

0.0 0.0 0.0 1.98 MB

A Gradle plugin for deploying JAR and WAR files to Heroku.

License: MIT License

Groovy 42.93% Java 57.07%

heroku-gradle's 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.

heroku-gradle's People

Contributors

jkutner avatar malax avatar breskeby avatar dependabot[bot] avatar tekacs avatar edmorley avatar kyle-cackett avatar man-at-home avatar tobias- avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.