README.md
This is the official Heroku buildpack for apps that use Gradle as their build tool. It's primarily used to build Java applications, but it can also build applications written in other JVM languages.
If you're using a different JVM build tool, use the appropriate buildpack:
This buildpack officially supports Gradle 8.x and 9.x. Gradle 9.x is the current recommended version.
See the Getting Started with Gradle on Heroku tutorial.
Your app requires a gradlew script in the root directory. This script is created when you install the Gradle Wrapper in your project.
Specify an OpenJDK version by creating a system.properties file in the root of your project directory and setting the java.runtime.version property. See the Java Support article for available versions and configuration instructions.
The buildpack uses the Gradle Wrapper to determine which Gradle version to use. To change the Gradle version, see Upgrading the Gradle Wrapper.
Configure the buildpack by setting environment variables:
Environment Variable Description DefaultGRADLE_TASK
Gradle task to execute
stage*
* The buildpack may use a different default task based on detected frameworks (e.g., build for Spring Boot and Quarkus, shadowJar for Micronaut).
For more information about using Java on Heroku, see the Java Support documentation on Dev Center.
For new applications:
For existing applications: