A standalone native executable for JaCoCo CLI, built with GraalVM Native Image.
This project compiles the JaCoCo CLI (jacococli.jar) into a single platform-specific binary using GraalVM, eliminating
the need for a JVM at runtime.
Build the native executable:
./gradlew nativeCompileThe binary will be placed at build/native/nativeCompile/jacoco-cli.
Use it as a drop-in replacement for java -jar jacococli.jar:
# Show help
./jacoco-cli help
# Generate a report
./jacoco-cli report coverage.exec \
--classfiles build/classes \
--sourcefiles src/main/java \
--html report
# Merge execution data files
./jacoco-cli merge a.exec b.exec --destfile merged.exec
# Dump execution data from a running JVM agent
./jacoco-cli dump --address localhost --port 6300 --destfile coverage.exec
# Compute code instrumentation
./jacoco-cli instrument classes --dest instrumentedPre-built binaries are available on the Releases page for:
| OS | Architecture | Binary |
|---|---|---|
| Linux | x86_64 | jacoco-cli-linux-x86_64 |
| Linux | aarch64 | jacoco-cli-linux-aarch64 |
| macOS | aarch64 | jacoco-cli-macos-aarch64 |
| Windows | x86_64 | jacoco-cli-windows-x86_64.exe |
The project wraps org.jacoco.cli.internal.Main (JaCoCo 0.8.14) and compiles it to a native binary via
the GraalVM Native Build Tools Gradle plugin. The custom App entry
point rewrites help text to reference jacoco-cli instead of java -jar jacococli.jar.