Optimize Gradle build performance for faster iteration#193
Merged
Conversation
- Enable parallel builds and increase daemon heap to 2GB with ParallelGC - Decouple spotlessCheck from build lifecycle (enforceCheck=false) - Skip javadocJar/sourcesJar on local builds (CI-only) - Reduce test output to FAILED events only - Add explicit spotlessCheck to CI workflow Build tasks reduced from 131 to 91 (30% reduction). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
54a378c to
550ad8f
Compare
em3s
commented
Feb 9, 2026
Contributor
Author
em3s
left a comment
There was a problem hiding this comment.
Code Review — claude code (opus 4.6)
Overall the approach is sound — decouple expensive tasks locally, keep them enforced in CI. No critical issues.
MEDIUM
1. org.gradle.daemon=true is redundant (gradle.properties:6)
- Gradle daemon is enabled by default since Gradle 3.0. This line is a no-op. Remove it or add a comment that it's intentional documentation.
2. System.getenv("CI") at configuration time (BaseConventionsPlugin.kt:62)
- Works correctly, but creates an implicit undocumented dependency on the
CIenv var. Withorg.gradle.caching=true, switching environments could cause stale cache behavior sinceSystem.getenv()isn't tracked as a configuration cache input. - Consider using a Gradle property instead (
-PgenerateJars=true), which integrates better with caching. At minimum, add a comment explaining why.
3. Format violations won't be caught locally
setEnforceCheck(false)means./gradlew buildno longer runs spotless. CI compensates correctly (spotlessCheck build), but developers will only discover violations after push. Consider documenting that./gradlew spotlessApplyshould be run before pushing, or adding a lightweight pre-commit hook.
LOW
4. SKIPPED tests are now invisible (BaseConventionsPlugin.kt:78)
- Logging only
FAILEDhides skipped tests, which can indicate forgotten@Disabledannotations or environment issues. Consider:
events = setOf(TestLogEvent.FAILED, TestLogEvent.SKIPPED)5. println in convention plugins (BaseConventionsPlugin.kt:18)
- Pre-existing (not introduced by this PR), but worth a follow-up ticket to replace with
project.logger.lifecycle()across all convention plugins.
Positive
- CI workflow change is correct —
spotlessCheck buildensures formatting is still enforced org.gradle.parallel=truewill meaningfully speed up the multi-module buildmaxParallelForkslogic is safe and well-implemented- The overall strategy (fast local, strict CI) is pragmatic
Verdict: Approve with minor changes. The MEDIUM items are worth addressing before merge but nothing is blocking.
- Remove redundant org.gradle.daemon=true (default since Gradle 3.0) - Add SKIPPED to test log events for visibility into disabled tests - Replace println with project.logger.lifecycle() in convention plugins - Add comments explaining CI-only jar generation and spotless workflow Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… convention plugins Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Author
Changes Summary — claude code (opus 4.6)Original PR
Review Fixes
|
…ntion plugins Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Optimize Gradle build/test cycle for faster AI-assisted iterative development. Eliminates unnecessary tasks (spotlessCheck, javadoc, sourcesJar) from default builds and enables parallel execution.
Plan
Created by claude code (opus 4.6)
gradle.properties— enable parallel builds, increase JVM memoryBaseConventionsPlugin.kt— decouple spotlessCheck fromchecklifecycleBaseConventionsPlugin.kt— make javadocJar/sourcesJar CI-onlyBaseConventionsPlugin.kt— reduce test logging verbosityDetails
org.gradle.parallel=trueorg.gradle.daemon=true-Xmx2g -XX:+UseParallelGCchecktaskbuildbuildNot included:
org.gradle.configuration-cache— incompatible withProjectExt.kt(runsgitcommands during configuration phase). Separate task.Progress
🤖 Generated with Claude Code