Gradle Build taste
# Gradle Build taste of a JVM developer who wants fast and boring builds - Use the Kotlin DSL (build.gradle.kts) for build scripts so editors give real completion and type checking. Confidence: 0.85 - Always commit the
Works with
claude-code (compatible), claude (compatible), codex (compatible), chatgpt (compatible), gemini-cli (compatible), cursor (compatible), copilot (compatible), opencode (compatible), amp (compatible), roo (compatible), kiro (compatible), goose (compatible), junie (compatible), trae (compatible), cline (compatible), continue (compatible), antigravity (compatible), windsurf (compatible), augment (compatible), qwen-code (compatible), aider (compatible)
Content
Gradle Build taste of a JVM developer who wants fast and boring builds
- Use the Kotlin DSL (
build.gradle.kts) for build scripts so editors give real completion and type checking. Confidence: 0.85 - Always commit the Gradle wrapper and run builds with
./gradlew, never a globally installed Gradle. Confidence: 0.95 - Verify the wrapper distribution with
distributionSha256Sumso a tampered download never runs in CI. Confidence: 0.75 - Keep every dependency and plugin version in a
gradle/libs.versions.tomlversion catalog. Confidence: 0.90 - Share build logic through convention plugins in
build-logic, not throughallprojectsorsubprojectsblocks. Confidence: 0.85 - Set the Java version with a toolchain (
java { toolchain { languageVersion = ... } }) instead of relying on whatever JDK is installed. Confidence: 0.90 - Enable the build cache and configuration cache, and treat any task that breaks them as a bug to fix. Confidence: 0.80
- Turn on
org.gradle.parallel=trueand a sensibleorg.gradle.jvmargsingradle.propertieschecked into the repo. Confidence: 0.80 - Register tasks lazily with
tasks.registerand the Provider API; avoidtasks.createand eager configuration. Confidence: 0.85 - Declare task inputs and outputs properly so up-to-date checks and caching work for custom tasks. Confidence: 0.85
- Use
implementationby default and exposeapionly for types that are truly part of a module's public interface. Confidence: 0.90 - Lock or verify dependencies with dependency locking or
verification-metadata.xmlfor builds that ship to production. Confidence: 0.70 - Never use dynamic versions like
1.+orlatest.releasein anything that gets released. Confidence: 0.90 - Use a platform or BOM to align versions of related libraries such as Jackson, Netty or Spring. Confidence: 0.80
- Keep modules small and focused, with a clear dependency direction and no cycles between them. Confidence: 0.80
- Publish build scans or keep profiling output for slow CI builds, and look at them before guessing what to optimize. Confidence: 0.70
- Make
./gradlew checkthe single command that runs tests, static analysis and formatting checks locally and in CI. Confidence: 0.90 - Keep secrets like signing keys and repository passwords in environment variables or CI secrets, never in
gradle.propertiesin the repo. Confidence: 0.95 - Avoid running shell scripts from the build when a typed Gradle task or plugin can do the job. Confidence: 0.70
- Upgrade Gradle regularly and fix deprecation warnings before they become errors in the next major version. Confidence: 0.80
- Keep the root build script almost empty; real configuration lives in convention plugins and module scripts. Confidence: 0.75
Source and license
- Source
- Prompts Chat
- Original
- f/awesome-chatgpt-prompts/prompts.csv#gradle-build-taste
- License
- MIT