Gradle
$ gradle Official Med RiskGradle (gradle / ./gradlew) powers incremental Java, Kotlin, and Android builds via Groovy/Kotlin DSL scripts and a persistent build cache. It provides --console=plain, --dry-run (-m), --offline, and --no-daemon for deterministic headless CI and agent workflows.
brew install gradle gradle executes local incremental JVM/Android compilation, dependency resolution, and JUnit test tasks directly in the repo.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports --console=plain, --dry-run (-m), --offline, --no-daemon, and --quiet, though outputs are plain text without native --json.
--console=plainstrips dynamic progress bars and ANSI color codes--dry-runevaluates and prints the task graph without running actions
--dry-run inspects task graphs safely and outputs stay in build/ and ~/.gradle/, though build.gradle(.kts) executes arbitrary JVM code during configuration.
gradle <task> --dry-runvalidates task wiring before execution
Cross-platform via Homebrew, SDKMAN, and project ./gradlew wrapper across macOS, Linux, and Windows, requiring a compatible JDK.
./gradlewpins exact Gradle version per repo, requires JDK
Incremental task outputs, build cache, and configuration cache make repeated compile/test iterations significantly faster than Maven.
- Incremental builds and build cache skip up-to-date tasks
Official Gradle Inc. open-source project (gradle/gradle) under Apache-2.0.
- Maintained by Gradle Inc. (
gradle/gradle)
Extensive official CLI guide at docs.gradle.org, though Groovy vs Kotlin DSL examples vary across versions.
- Official CLI reference at docs.gradle.org
Security, Auth & Guardrails
Public repositories require no auth; private Maven/Gradle credentials are stored in ~/.gradle/gradle.properties or environment variables.
Apache-2.0 open-source CLI; free to use (Develocity Build Scans are optional).
# Gradle Agent Rules - Prefer `./gradlew` over global `gradle` when the wrapper exists in the repo. - Always pass `--console=plain` (and `--no-daemon` in ephemeral sandboxes) and preview task graphs with `--dry-run`.
Agent-Ready Command Recipes
Safe Read-Only Queries
gradle test --dry-run --console=plain
Resolves the task dependency graph and prints skipped task order without executing actions.
gradle tasks --console=plain
Displays runnable project tasks without rich ANSI progress bars.
Controlled Writes & Previews
gradle check --console=plain --no-daemon
Executes compilation and tests in a single clean JVM process without leaving background daemons.
Strengths for Agents
- +
--console=plaineliminates dynamic terminal progress bars that garble agent stdout. - +
--dry-runpreviews the exact task DAG before running expensive builds. - + Incremental task caching and
./gradlewwrapper ensure fast, reproducible repo builds.
Caveats & Pitfalls
- ! No native
--jsonoutput for task lists, dependencies, or test summaries. - ! Default background Gradle daemon can linger in short-lived sandboxes unless
--no-daemonis passed.