What this thread does
The problem
A wrapper upgrade breaks build logic, tests or Configuration Cache. Move the daemon JDK and plugins first, then prove the same tests and artifacts still run.
Versions and status, checked 2026-11-23
| Item | Verified value | Official source |
|---|---|---|
| Gradle | As of November 2026, 9.9.2, released 2026-11-19; current stable, not snapshot | Release service, tagged release |
| Licence | Apache-2.0 | Tagged licence |
| Daemon JVM | Java 17–27; application toolchains are separate | Compatibility matrix |
| Embedded Kotlin | 2.4.21; Kotlin DSL language level 2.2 | Same matrix |
| Major migration baseline | 8.14.6; initial 9.0.0 embeds Kotlin 2.2.0 | Major guide |
GitHub's latest release and the release service agree on 9.9.2. No paid services or prices are compared.
What changed across recent releases
- Gradle 9.7.0, released 2026-08-06, advances Isolated Projects to incubating and improves Configuration Cache invalidation. Kotlin DSL accessor generation stops using the build cache by default; script compilation remains cached. Regenerated accessors alone do not imply cache corruption. Release notes, checked 2026-11-23.
- Gradle 9.8.0, released 2026-09-24, adds Java 27 support, optional Maven mirror reuse through
org.gradle.mirror.maven.settings=true, lazy copy destinations and clickable problem locations. The mirror flag is off by default. Release notes, checked 2026-11-23. - As of November 2026, Gradle 9.9.2 addresses four security vulnerabilities. Prefer this patch when adopting Gradle 9. Patch notes, checked 2026-11-23.
What breaks at the major boundary
Kotlin DSL and convention plugins move to newer language semantics. Replace script-instance labels such as this@Build_gradle with the appropriate project, settings or gradle reference. Kotlin Gradle Plugin 2.0.0 is the initial major's minimum, not a promise of compatibility with every later minor.
Deprecated APIs including jcenter() and Project.exec/javaexec disappear; migrate execution to supported services. Custom Test tasks lose implicit test-source wiring and can silently skip tests. Configure classes/runtime classpath or use test suites. A test task with sources but no discovered tests can now fail; check its engine before suppressing the failure. Warning mode is not a permanent cache fix; incompatible tasks can still discard entries. Major guide, checked 2026-11-23.
Ordered upgrade
1. On the old wrapper run ./gradlew help --warning-mode=all and normal verification tasks. Update plugins responsible for warnings. If behind the baseline, first follow the within-major guide, checked 2026-11-23. 2. Choose a supported daemon JDK in shell, IDE and CI; inspect ./gradlew --version. Preserve the application's explicit compilation/test toolchains. Changing the daemon does not require raising application bytecode targets. 3. Use the tagged release's two wrapper invocations so scripts/JAR also refresh:
./gradlew :wrapper --gradle-version=9.9.2
./gradlew :wrapper
./gradlew --version
Official upgrade commands, checked 2026-11-23.
4. Read every intervening section of the within-major migration guide, checked 2026-11-23. Gradle 9.8 serializes task logging listeners rather than dropping them, so nonserializable listeners can now fail cache storage. Kotlin singleton identity survives reload, but mutable singleton state is not restored. Earlier minors remove Problems API internals: plugins using them must be updated. Initial-major Android plugin minimums do not establish current-minor compatibility. 5. Run real build/test tasks without Configuration Cache, then twice with --configuration-cache. Compare test counts, artifacts and reports. These are proposed checks, not results from this draft.
Verified cache error and fix
The official sample prints Invocation of 'Task.project' by task ':someTask' at execution time is unsupported with the configuration cache. Your task name differs. The action is reaching into the live project model. Run the affected task with --configuration-cache --stacktrace and read its linked HTML report. Exact diagnostic and corrected example, checked 2026-11-23.
Capture inputs during configuration, expose task properties and inject FileSystemOperations instead of calling project.copy in an action. A custom task can declare @get:Inject abstract val fs: FileSystemOperations and call fs.copy { ... }. Official requirements, checked 2026-11-23.
Rerun the task twice with --configuration-cache; also verify with --rerun-tasks so an up-to-date result cannot hide action-path problems. Do not repeatedly delete caches or make --configuration-cache-problems=warn the finished fix.
Recommendation by constraint
| Constraint | Path |
|---|---|
| Mature JVM app | Update JDK/plugins and wrapper; preserve target toolchains and test counts |
| Shared Kotlin convention plugins | Test build logic separately and check consumer compatibility before rebuilding plugins |
| Plugin blocks cache adoption | Update the responsible plugin or isolate its incompatible task while fixing it |
| Android/KMP build | Check its ecosystem matrix first; use the neighbour for Android-specific migration |
Community evidence
- In issue #32542, alllex demonstrates execution-time Project access failures hidden by a later up-to-date run. Maintainer mlopatkin explains why soft failures could produce invalid results. This closed historical issue supports testing executed tasks; it does not establish a current-patch bug. Checked 2026-11-23.
- In issue #23506, aSemy shows a successful wrapper invocation changing properties while leaving the wrapper JAR unchanged. This illustrates the need to follow the official two-invocation sequence. Checked 2026-11-23.
A prompt to give your agent
Read the linked major guide, every intervening minor section and tagged release instructions before editing; do not guess requirements or errors. Inventory wrapper, daemon JDK, application toolchains, Kotlin plugin and convention plugins. Map warnings to owners, update in stages and compare executed tests/artifacts. Read the linked cache report and official requirements, then demonstrate storage and reuse. List unresolved plugin constraints.
Limits
No build, plugin compilation, wrapper upgrade or cache benchmark was run. Community evidence is historical, not independent validation of the target patch. Exact JVM-too-old, Kotlin compiler, missing-tests and logging-listener diagnostic strings were not verified and are not asserted. Only the cache sentence above is verified verbatim. No newest-patch adoption claim is made.
Started from a post by @gradle, packaged by the editor. Original post