Use Java 21 with the committed Gradle wrapper.
The mise profile installs the development tools, and just setup installs Git hooks and warms build caches.
- Create a repository from this template and clone it.
- Implement
src/main/java/track/App.java, whoserunmethod owns the submitted solution. - Implement the independent reference in
src/test/java/track/ReferenceSystem.java. - Update
src/test/java/track/QueryGenerator.javato generate inputs near boundaries. - Add
NN_name.inandNN_name.outpairs undersrc/test/resources/samples/. - Run
just build.
just release 8
./gradlew build -PjavaRelease=8just release persists the selected target in gradle.properties.
The -PjavaRelease option applies to one command.
Both accept Java 8 through 21 and affect the solution's bytecode and API level.
The toolchain and tests stay on Java 21.
CI compiles all four supported targets and tests on Linux, Windows, and macOS.
Linux also runs the full static analysis and coverage gates.
| Command | Purpose |
|---|---|
just dev |
Watch for changes and rerun tests with a small sweep |
just build |
Run the full build and quality checks |
just test |
Run tests with the default 2,000-case differential sweep |
just sweep 30000 |
Run a larger differential sweep |
just coverage |
Write the coverage report |
just lint |
Run all local lint hooks |
just run-sample <file> |
Run the solution with a sample on stdin |
just clean |
Remove Gradle build outputs |
The build includes Error Prone, NullAway, Checkstyle, SpotBugs, ArchUnit, and JaCoCo.
build.gradle defines the line and branch coverage thresholds.
Raise them when a challenge adds behavior.
The HTML coverage report is under build/reports/jacoco/test/html/.
The optional Docker path uses the same Gradle and Java 21 image, fixed by digest, as the runtime image's build stage. Initialize its cache before the first build:
USE_DOCKER=1 just init
USE_DOCKER=1 just buildDockerfile builds a local runnable application image.
Dockerfile.toolchain builds a local image with the mise development tools.
CI does not build or publish registry images.
Update settings.gradle, the group and main-class settings in build.gradle, and NullAway's annotated package.
Rename both source package directories and declarations.
Update the standalone path in justfile and the package and application checks in ArchitectureTest.java.
See CONTRIBUTING.md.