Skip to content
This repository was archived by the owner on Oct 22, 2023. It is now read-only.

Files

Latest commit

b79df2c · Jan 25, 2021

History

History
54 lines (36 loc) · 1.8 KB

README.md

File metadata and controls

54 lines (36 loc) · 1.8 KB

java-bundle

Build Status License

A bundle for Batect that provides a development container for JVM-based languages that use Gradle, with sensible default configuration.

Usage

Setup

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

Containers

java-build-env

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.

Example

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.

Development

Run ./batect --list-tasks to see a list of available tasks for this project.