Address Gradle 9.6 deprecations#719
Conversation
After this branch's fixes, two deprecations remain. Both originate inside the detekt (1.23.8) and gradle-doctor (0.12.1) Gradle plugins on their `apply()` paths, and both plugins are already at their latest published release, so they cannot be fixed in `config` yet. Record a `blocked` task note with the stack-trace evidence, the reproduce command, and the bump trigger so the next deprecation sweep does not re-investigate them. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: de52cc57c8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
This pull request updates config’s Gradle/Kotlin-DSL sources to eliminate deprecation warnings introduced by the Gradle 9.6.1 upgrade (especially those noted as “will fail in Gradle 10”), and removes legacy JaCoCo script plugins that are now superseded by the Kover-based module conventions.
Changes:
- Retired the legacy “vanilla JaCoCo” script plugins and taught
migrateto delete stale copies from consumer repos. - Replaced deprecated Kotlin-DSL delegated task/source-set access patterns (
registering/getting) with non-deprecated equivalents. - Added a tracked task note documenting the remaining upstream plugin deprecations and when to revisit upgrades.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
migrate |
Removes stale consumer copies of retired JaCoCo script plugins during JVM repo migration. |
buildSrc/src/main/kotlin/write-manifest.gradle.kts |
Replaces deprecated delegated task registration with explicit tasks.register(...). |
buildSrc/src/main/kotlin/uber-jar-module.gradle.kts |
Replaces deprecated delegated task lookup with tasks.getByName(...) configuration. |
buildSrc/src/main/kotlin/kmp-module.gradle.kts |
Replaces deprecated delegated source set access with getByName(...) configuration. |
buildSrc/src/main/kotlin/jvm-module.gradle.kts |
Replaces deprecated delegated task registration with register<Delete>(...). |
buildSrc/src/main/kotlin/jacoco-kotlin-jvm.gradle.kts |
Deleted (retired legacy JaCoCo script plugin). |
buildSrc/src/main/kotlin/jacoco-kmm-jvm.gradle.kts |
Deleted (retired legacy JaCoCo script plugin). |
buildSrc/src/main/kotlin/io/spine/gradle/report/pom/ProjectMetadata.kt |
Removes deprecated PropertyDelegate marker usage while preserving delegation behavior via operator getValue. |
.agents/tasks/gradle-9.6-deprecations.md |
Adds a tracker note for remaining upstream-only deprecations and upgrade triggers. |
Describe the JDK 17 toolchain requirement instead of hard-coding the macOS-only `/usr/libexec/java_home`, keeping that as an example. Addresses Copilot review feedback on the task note. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
What & why
Following the bump to Gradle 9.6.1, the build surfaced a number of deprecation
warnings (several "will fail in Gradle 10"). This branch clears every
deprecation that originates in
config's own sources and retires a pair ofalready-deprecated JaCoCo script plugins.
Changes
Retire the vanilla-JaCoCo script plugins (
6ee1ede8)buildSrc/src/main/kotlin/jacoco-kotlin-jvm.gradle.ktsandjacoco-kmm-jvm.gradle.kts(superseded by Kover via thejvm-module/kmp-moduleconventions).migrateto remove them from consumers on the next pull, mirroring theexisting ProtoData/McJava retirement block (cleans up stale copies; no
copy-then-delete since they're gone from
config).Fix Gradle 9.6 / Kotlin-DSL deprecations in
buildSrc(09eaf71b)ProjectMetadata.kt: drop the deprecatedorg.gradle.kotlin.dsl.PropertyDelegateinterface — Kotlin delegation only needs an
operator fun getValue, so themarker interface (and the
provideDelegateimport) are gone. Behaviouridentical, including the
extra[name]fallback.jvm-module.gradle.kts,write-manifest.gradle.kts:val x by registering { }→
val x = register<Type>(name) { }(returns the same lazyTaskProvider).kmp-module.gradle.kts,uber-jar-module.gradle.kts:val x by getting { }→
getByName(name) { }(eager equivalent, matching the old delegatesemantics; unused
vals and their@Suppress("unused")dropped).Track the remaining (upstream) deprecations (
de52cc57).agents/tasks/gradle-9.6-deprecations.md(status: blocked).Remaining deprecations are upstream — not fixable here
Two configuration-time warnings remain, and both come from third-party plugins'
apply()code, not fromconfig:ReportingExtension.file(String)io.gitlab.arturbosch.detekt.DetektPlugin.applyProject.getPropertiescom.osacky.doctor→RemoteCacheEstimation.<init>Both plugins are already at their latest published release, and neither latest
release fixes the call — so there is nothing to upgrade to yet. They are
non-fatal on 9.6. The task note records the evidence and the bump trigger for
when upstream ships Gradle-9.x-compatible releases. Global warning suppression
was deliberately avoided (it would mask
config's own future deprecations).Verification
🤖 Generated with Claude Code