Skip to content

Address Gradle 9.6 deprecations#719

Merged
alexander-yevsyukov merged 4 commits into
masterfrom
address-deprecations
Jun 30, 2026
Merged

Address Gradle 9.6 deprecations#719
alexander-yevsyukov merged 4 commits into
masterfrom
address-deprecations

Conversation

@alexander-yevsyukov

Copy link
Copy Markdown
Contributor

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 of
already-deprecated JaCoCo script plugins.

Changes

Retire the vanilla-JaCoCo script plugins (6ee1ede8)

  • Deleted buildSrc/src/main/kotlin/jacoco-kotlin-jvm.gradle.kts and
    jacoco-kmm-jvm.gradle.kts (superseded by Kover via the jvm-module /
    kmp-module conventions).
  • Taught migrate to remove them from consumers on the next pull, mirroring the
    existing 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 deprecated org.gradle.kotlin.dsl.PropertyDelegate
    interface — Kotlin delegation only needs an operator fun getValue, so the
    marker interface (and the provideDelegate import) are gone. Behaviour
    identical, 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 lazy TaskProvider).
  • kmp-module.gradle.kts, uber-jar-module.gradle.kts: val x by getting { }
    getByName(name) { } (eager equivalent, matching the old delegate
    semantics; unused vals and their @Suppress("unused") dropped).

Track the remaining (upstream) deprecations (de52cc57)

  • Added .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 from config:

Deprecation Source Version
ReportingExtension.file(String) io.gitlab.arturbosch.detekt.DetektPlugin.apply detekt 1.23.8
Project.getProperties com.osacky.doctorRemoteCacheEstimation.<init> gradle-doctor 0.12.1

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

./gradlew :buildSrc:build detekt --rerun-tasks   # BUILD SUCCESSFUL, zero `w:` warnings
./gradlew help --warning-mode all --stacktrace   # only the two upstream warnings remain

🤖 Generated with Claude Code

alexander-yevsyukov and others added 3 commits June 29, 2026 19:57
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>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread migrate

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 migrate to 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.

Comment thread .agents/tasks/gradle-9.6-deprecations.md
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>
@alexander-yevsyukov alexander-yevsyukov moved this from 🏗 In progress to In Review in v2.0 Jun 30, 2026
@alexander-yevsyukov alexander-yevsyukov merged commit 2d561f0 into master Jun 30, 2026
3 checks passed
@alexander-yevsyukov alexander-yevsyukov deleted the address-deprecations branch June 30, 2026 08:10
@github-project-automation github-project-automation Bot moved this from In Review to ✅ Done in v2.0 Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants