A bundle for Batect that provides a development container for JVM-based languages that use Gradle, with sensible default configuration.
Add the following to your batect.yml
:
include:
- type: git
repo: https://github.com/batect/java-bundle.git
ref: XXX # Replace with latest version from https://github.com/batect/java-bundle/releases
A container (based on the AdoptOpenJDK images) with sensible defaults for use with Gradle.
It mounts the project directory into the container, enables run as current user mode and configures a cache for dependencies downloaded by Gradle.
The Gradle daemon is disabled, as starting the daemon is counterproductive in an ephemeral container.
Note that the container does not contain Gradle itself - use the Gradle wrapper.
tasks:
build:
description: Build the project.
group: Build tasks
run:
container: java-build-env
command: ./gradlew build
include:
- type: git
repo: https://github.com/batect/java-bundle.git
ref: XXX # Replace with latest version from https://github.com/batect/java-bundle/releases
The Java sample project also demonstrates how to use this bundle.
Run ./batect --list-tasks
to see a list of available tasks for this project.