Skip to content

build: upgrade Gradle wrapper to 9.8.2 and enable build cache - #278

Merged
epugh merged 3 commits into
apache:mainfrom
adityamparikh:chore/gradle-9.8.2-wrapper-best-practices
Oct 26, 2026
Merged

epugh merged 3 commits into
apache:mainfrom
adityamparikh:chore/gradle-9.8.2-wrapper-best-practices

Conversation

@adityamparikh

@adityamparikh adityamparikh commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Applies the gradle-wrapper-upgrade and gradle-best-practices agent skills to the build.

Wrapper (gradle-wrapper-upgrade)

  • Gradle wrapper 9.7.1 to 9.8.2 (-bin, distributionSha256Sum pinned; :wrapper run twice so the scripts and jar come from the new templates). Re-running the skill on 9.8.2 regenerates identical files.

Best-practices audit (gradle-best-practices)

  • gradle.properties (ASF license header for RAT) enabling the build cache, the configuration cache, and UTF-8 for the Gradle daemon. use_build_cache, use_utf8_encoding, use_configuration_cache
  • Configuration cache blockers removed: the docker info probe in dockerIntegrationTest uses providers.exec instead of ProcessBuilder, and the JaCoCo class-directory filter no longer calls the eager FileCollection.files. avoid_eager_file_collection_apis
  • Jib's docker executable is chosen from os.name instead of the internal org.gradle.internal.os.OperatingSystem. do_not_use_internal_apis
  • Repositories are declared in settings.gradle.kts (and a new buildSrc/settings.gradle.kts) instead of in each build script. set_up_repositories_in_settings
  • unitTest and bootBuildImage are referenced through their providers / typed accessors instead of string names. dont_hardcode_task_names

Verification

  • ./gradlew build passes on 9.8.2 with JDK 25 (424 tests, spotlessCheck and RAT included), and ./gradlew -p buildSrc test passes.
  • The configuration cache entry is stored on the first run and reused on the second for assemble and build -x test.

Not included

Structural findings from the same audit, each its own change: buildSrc/ to build-logic/ composite build, moving the Spring app out of the root project, and TestKit tests for the license/NOTICE task types.

🤖 Generated with Claude Code

adityamparikh and others added 3 commits October 21, 2026 15:55
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: adityamparikh <aditya.m.parikh@gmail.com>
Enable org.gradle.caching and set -Dfile.encoding=UTF-8 in
org.gradle.jvmargs per Gradle best practices.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: adityamparikh <aditya.m.parikh@gmail.com>
Findings from the gradle-best-practices audit of this build:

- use_configuration_cache: set org.gradle.configuration-cache=true. The
  `docker info` probe now goes through providers.exec instead of
  ProcessBuilder, and the JaCoCo class-directory filter no longer calls
  the eager FileCollection.files.
- do_not_use_internal_apis: pick the Jib docker executable from the
  os.name system property instead of org.gradle.internal.os.OperatingSystem.
- set_up_repositories_in_settings: declare repositories in
  dependencyResolutionManagement (root settings, and a new buildSrc
  settings file) rather than in each build script.
- dont_hardcode_task_names: reference unitTest and bootBuildImage through
  their providers / typed accessors instead of string names.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Aditya Parikh <aditya.m.parikh@gmail.com>
@sonarqubecloud

Copy link
Copy Markdown

@epugh
epugh merged commit 1dc533b into apache:main Oct 26, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants