From 6a8316388eb446bff0e204e5989240d725e83abe Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Fri, 10 Jul 2026 19:16:43 +0100 Subject: [PATCH 1/2] Record verified upstream status in the Gradle 9.6 deprecations tracker Re-verify the third-party deprecation warnings on Gradle 9.6.1 with full deprecation stack traces (`-Dorg.gradle.deprecation.trace=true`) and record the findings in `.agents/tasks/gradle-9.6-deprecations.md`: - detekt 1.23.8 - `ReportingExtension.file(String)` raised by `DetektPlugin.apply`. The upstream fix (detekt#8452, closed 2025-08-31) ships only with detekt 2.0, still in alphas, under the new `dev.detekt` plugin ID and Maven coordinates. 1.23.8 remains the newest stable. - gradle-doctor 0.12.1 - `Project.getProperties` is read three times by `RemoteCacheEstimation` (lines 20-22). Unfixed even on upstream `master`; no upstream issue tracks it; 0.12.1 has no git tag, so watch Maven Central metadata instead of GitHub releases. - Kover 0.9.8 - add the third, cache-masked warning ("Project object as a dependency notation", `PrepareKover.kt:29`, kotlinx-kover#818). It fires during `buildSrc` precompiled-script-plugin accessor generation and is hidden when those tasks are FROM-CACHE. This is the follow-up suggested when closing PR #725, and is distinct from the `KoverConfig.kt` usage handled separately. No plugin bumps are possible: all three plugins are already at their latest released versions. The tracker stays `blocked` on upstream. Co-Authored-By: Claude Fable 5 --- .agents/tasks/gradle-9.6-deprecations.md | 89 ++++++++++++++++++++---- 1 file changed, 75 insertions(+), 14 deletions(-) diff --git a/.agents/tasks/gradle-9.6-deprecations.md b/.agents/tasks/gradle-9.6-deprecations.md index d717abc0..02209e12 100644 --- a/.agents/tasks/gradle-9.6-deprecations.md +++ b/.agents/tasks/gradle-9.6-deprecations.md @@ -10,7 +10,7 @@ started: 2026-06-29 Reach a clean Gradle 9.6 configuration/build with **no deprecation warnings**. All deprecations originating in `config`'s own sources have been fixed on the -`address-deprecations` branch. The two warnings that remain originate **inside +`address-deprecations` branch. The warnings that remain originate **inside third-party Gradle plugins** and cannot be fixed here — this note tracks them until upstream ships Gradle-9.x-compatible releases. @@ -24,20 +24,35 @@ using a JDK 17 toolchain — point `JAVA_HOME` at a JDK 17 install for your OS ./gradlew help --warning-mode all --stacktrace ``` -Two deprecations surface during `> Configure project :`. Verified stack traces -show both are raised from the plugins' own `apply()` code, not from `config`: +Add `-Dorg.gradle.deprecation.trace=true` to print the full stack trace of +every deprecation warning — the reliable way to attribute a nag to a plugin. + +Two deprecations surface during `> Configure project :`. A third hides in +`buildSrc`: it fires while Gradle generates the precompiled-script-plugin +accessors (our convention plugins are applied against a synthetic project), +so it is **masked whenever those tasks are `FROM-CACHE`/`UP-TO-DATE`**. +Reproduce it on a cold cache: + +```bash +./gradlew :buildSrc:generatePrecompiledScriptPluginAccessors --rerun-tasks \ + --warning-mode all -Dorg.gradle.deprecation.trace=true +``` + +Verified stack traces show all three are raised from the plugins' own +`apply()` code, not from `config`: | Deprecation | Raised by | Plugin / version | |---|---|---| | `ReportingExtension.file(String)` (removed in Gradle 10) | `io.gitlab.arturbosch.detekt.DetektPlugin.apply` (`DetektPlugin.kt:28`) | detekt-gradle-plugin **1.23.8** | -| `Project.getProperties` (fails in Gradle 10) | `com.osacky.doctor` → `RemoteCacheEstimation.` (`RemoteCacheEstimation.kt:20`) | gradle-doctor **0.12.1** | +| `Project.getProperties` (fails in Gradle 10) | `com.osacky.doctor` → `RemoteCacheEstimation.` (`RemoteCacheEstimation.kt:20–22`, one warning per line) | gradle-doctor **0.12.1** | +| `Project` object as a dependency notation (fails in Gradle 10) | `kotlinx.kover.gradle.plugin.KoverGradlePlugin.apply` → `PrepareKoverKt.prepare` (`PrepareKover.kt:29`) | kover-gradle-plugin **0.9.8** | Notes: - The detekt warning is *attributed* to `detekt-code-analysis.gradle.kts:67`, but line 67 is only the `id("io.gitlab.arturbosch.detekt")` apply site — the deprecated call is in the plugin bytecode. -- Both calls happen unconditionally on plugin apply, so no `detekt { }` / - `doctor { }` configuration can avoid them. +- All three calls happen unconditionally on plugin apply, so no `detekt { }` / + `doctor { }` / `kover { }` configuration can avoid them. - There is **nothing to upgrade to**: as of 2026-06-29, detekt's latest release is `1.23.8` (the version we use; no 2.x on the `detekt-gradle-plugin` coordinate) and gradle-doctor's latest is `0.12.1` (also what we use). Both @@ -45,6 +60,25 @@ Notes: - Confirmed there is **no** `ReportingExtension.file` / `Project.getProperties` call anywhere in `buildSrc` (the `System.getProperties()` in `write-manifest.gradle.kts:46` is Java's, unrelated). +- Upstream status, re-checked 2026-07-10: + - **detekt** — [detekt#8452](https://github.com/detekt/detekt/issues/8452) + (this exact deprecation) was closed as completed on 2025-08-31. The fix + (uses `ReportingExtension.baseDirectory`) lives only on `main` and ships + with detekt 2.0 — currently `2.0.0-alpha.5` — under the **new plugin ID + `dev.detekt`** and new `dev.detekt` Maven coordinates. 1.23.8 (2025-02) + is still the newest 1.x release. + - **gradle-doctor** — still unfixed even on upstream `master` + (`RemoteCacheEstimation.kt` last touched 2024-07); no upstream issue + tracks it. Note: 0.12.1 has no git tag or GitHub release — watch the + [Maven Central metadata](https://repo1.maven.org/maven2/com/osacky/doctor/doctor-plugin/maven-metadata.xml), + not the releases page. + - **Kover** — [kotlinx-kover#818](https://github.com/Kotlin/kotlinx-kover/issues/818) + (open) tracks its Gradle 9.6 deprecation; 0.9.8 is still the latest + release. +- The Kover-plugin-internal call above is **distinct** from `config`'s own + `Project`-notation usage in `KoverConfig.kt:172` + (`rootProject.project(sub.path)`), which is addressed in a separate change. + Fixing `KoverConfig` does not clear the plugin-internal warning. Decision: do **not** suppress globally via `org.gradle.warning.mode=none` — that would also hide `config`'s own future deprecations, defeating the purpose of @@ -53,18 +87,33 @@ this branch. Tolerate the two warnings (non-fatal on 9.6) and bump when fixed. ## Plan - [ ] Watch upstream for Gradle-9.x-compatible releases: - - [ ] detekt — Gradle 9 / `ReportingExtension` support (likely detekt 2.x). + - [ ] detekt — fix confirmed in 2.0 (alphas only so far); wait for a final. Releases: https://github.com/detekt/detekt/releases - - [ ] gradle-doctor — `Project.getProperties` removal. - Releases: https://github.com/runningcode/gradle-doctor/releases -- [ ] When a fixed detekt release exists: bump `detektVersion` in - `buildSrc/build.gradle.kts` via the `dependency-update` flow, re-run the - reproduce command, confirm the `ReportingExtension.file` warning is gone. + - [ ] gradle-doctor — `Project.getProperties` removal. No upstream issue + exists yet; filing one (or a trivial PR replacing + `project.properties.containsKey(...)` with + `providers.gradleProperty(...)` presence checks) would unblock this. + Releases can be tagless — watch Maven Central metadata (link in Notes). + - [ ] Kover — release above 0.9.8 with + [kotlinx-kover#818](https://github.com/Kotlin/kotlinx-kover/issues/818) + resolved. +- [ ] When a fixed detekt release exists: this is **not a plain bump** — the + plugin ID moves `io.gitlab.arturbosch.detekt` → `dev.detekt` and the + Maven group moves to `dev.detekt`, so `buildSrc/build.gradle.kts` + (`detektVersion` + the classpath dependency) and + `detekt-code-analysis.gradle.kts` (plugin ID) all change together, plus + any detekt-config migration 2.0 requires. Re-run the reproduce command, + confirm the `ReportingExtension.file` warning is gone. - [ ] When a fixed gradle-doctor release exists: bump `GradleDoctor.version` in `buildSrc/src/main/kotlin/io/spine/dependency/build/GradleDoctor.kt` via the `dependency-update` flow, re-run, confirm the `getProperties` warning is gone. -- [ ] Once both clear, flip this task to `done` and delete it. +- [ ] When a fixed Kover release exists: bump `koverVersion` in + `buildSrc/build.gradle.kts` **and** `Kover.version` in + `buildSrc/src/main/kotlin/io/spine/dependency/test/Kover.kt` via the + `dependency-update` flow, re-run the cold-`buildSrc` reproduce command, + confirm the dependency-notation warning is gone. +- [ ] Once all three clear, flip this task to `done` and delete it. ## Log @@ -74,6 +123,18 @@ this branch. Tolerate the two warnings (non-fatal on 9.6) and bump when fixed. - 2026-06-29 — Investigated the two remaining warnings; traced both to detekt 1.23.8 and gradle-doctor 0.12.1 internals. Both plugins already at latest available; no fix exists yet. Status set to `blocked` (on upstream). +- 2026-07-10 — Re-verified on Gradle 9.6.1 with full deprecation traces + (`:buildSrc:test detekt`, plus a cold + `:buildSrc:generatePrecompiledScriptPluginAccessors`). Both known warnings + unchanged; the doctor one fires ×3 (`RemoteCacheEstimation.kt:20–22`). + Upstream re-checked: detekt#8452 closed, fix ships only with detekt 2.0 + (`dev.detekt` plugin ID; alphas only); gradle-doctor unfixed even on + `master`, no upstream issue, 0.12.1 is tagless. Added the third, + cache-masked warning from Kover 0.9.8 (`PrepareKover.kt:29`, + kotlinx-kover#818) — the follow-up suggested when closing PR #725; it is + distinct from `config`'s own `KoverConfig.kt` usage (handled separately). + Nothing to bump — all three plugins already at their latest releases; + still `blocked` on upstream. - NOTE: this tracker is blocked on external releases and is expected to outlive the `address-deprecations` branch merge — do not delete it on merge; keep it - (or promote the fact to `.agents/memory/`) until both bumps land. + (or promote the fact to `.agents/memory/`) until all bumps land. From 5187f6a4de1a152149d5fd8887d9979bb06c5ee1 Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Fri, 10 Jul 2026 19:23:44 +0100 Subject: [PATCH 2/2] Make the config-owned KoverConfig call an exit criterion of the tracker Review follow-up on PR #732: the tracker could previously be closed once the three plugin-internal warnings clear, silently leaving behind the same Gradle 10 breakage in config-owned code - KoverConfig.kt:172 passes a `Project` as dependency notation, which only fires in consumer builds whose subprojects apply Kover and thus never shows in config's own runs. Track that call as an explicit checklist item (it is fixed in a separate change that has not landed on master yet) and require a warning-free cold-cache run of both reproduce commands before the tracker may be closed. Co-Authored-By: Claude Fable 5 --- .agents/tasks/gradle-9.6-deprecations.md | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/.agents/tasks/gradle-9.6-deprecations.md b/.agents/tasks/gradle-9.6-deprecations.md index 02209e12..39d6c4b4 100644 --- a/.agents/tasks/gradle-9.6-deprecations.md +++ b/.agents/tasks/gradle-9.6-deprecations.md @@ -77,8 +77,12 @@ Notes: release. - The Kover-plugin-internal call above is **distinct** from `config`'s own `Project`-notation usage in `KoverConfig.kt:172` - (`rootProject.project(sub.path)`), which is addressed in a separate change. - Fixing `KoverConfig` does not clear the plugin-internal warning. + (`rootProject.project(sub.path)` passed to `dependencies.add`), which is + addressed in a separate change. Fixing `KoverConfig` does not clear the + plugin-internal warning, and bumping Kover will not fix `KoverConfig`. + The `KoverConfig` call fires only in consumer builds whose subprojects + apply Kover, so it never shows up in `config`'s own runs — the checklist + below keeps it visible until the separate change lands. Decision: do **not** suppress globally via `org.gradle.warning.mode=none` — that would also hide `config`'s own future deprecations, defeating the purpose of @@ -113,7 +117,15 @@ this branch. Tolerate the two warnings (non-fatal on 9.6) and bump when fixed. `buildSrc/src/main/kotlin/io/spine/dependency/test/Kover.kt` via the `dependency-update` flow, re-run the cold-`buildSrc` reproduce command, confirm the dependency-notation warning is gone. -- [ ] Once all three clear, flip this task to `done` and delete it. +- [ ] Confirm the separate change fixing `config`-owned `KoverConfig.kt:172` + (a `Project` passed as dependency notation — the same Gradle 10 + failure, config-owned rather than plugin-internal) has landed on + `master`. As of 2026-07-10 it has **not**; if it stalls, fix it from + this tracker instead. +- [ ] Close only when the three plugin warnings are gone **and** the + `KoverConfig` item above is done, verified by a warning-free + cold-cache run of both reproduce commands; then flip this task to + `done` and delete it. ## Log @@ -135,6 +147,11 @@ this branch. Tolerate the two warnings (non-fatal on 9.6) and bump when fixed. distinct from `config`'s own `KoverConfig.kt` usage (handled separately). Nothing to bump — all three plugins already at their latest releases; still `blocked` on upstream. +- 2026-07-10 — Review follow-up on PR #732 (Codex): made the `config`-owned + `KoverConfig.kt:172` `Project`-notation call an explicit checklist item and + part of the exit criterion, so this tracker cannot be closed while that + Gradle 10 breakage is unfixed. It is being fixed in a separate change, + which has not landed on `master` yet. - NOTE: this tracker is blocked on external releases and is expected to outlive the `address-deprecations` branch merge — do not delete it on merge; keep it (or promote the fact to `.agents/memory/`) until all bumps land.