Update config: migrate to Gradle 9.6.1 API and clear build warnings#187
Merged
Conversation
The test primed `ProblemsProgressEventEmitterHolder` with hand-written stubs of `org.gradle.api.problems.internal.*` to work around gradle/gradle#31862 ("Problems service is not initialized" in `ProjectBuilder`-based tests). That bug was fixed in Gradle 8.14, and this project now runs Gradle 9.6.1, where the stubbed internal types were renamed (`InternalProblems` -> `ProblemsInternal`, `InternalProblemReporter` -> `ProblemReporterInternal`, etc.), breaking `compileTestKotlin`. Since `ProjectBuilder` now initializes the Problems service on its own, the workaround is dead code. Delete the priming call and both stub classes instead of re-shaping them to the new internal API — internal Gradle types carry no compatibility guarantee and would break again on the next upgrade. `apply Gradle scripts from classpath` and the rest of the suite pass without it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Gradle 9.6 deprecates two Kotlin DSL property-delegate forms that will
fail with an error in Gradle 10:
* `val name: Type by extra` — replaced with `extra["name"] as Type`.
* `val name: Task by tasks.getting { }` — replaced with the equivalent
`tasks.getByName("name") { }` recommended by the deprecation message.
Applied to the `versionToPublish` read and the `publishPlugins`/`publish`
task configuration in the `gradle-root-plugin`, `jvm-tool-plugins`, and
`protobuf-setup-plugins` build scripts. The `publish` configuration no
longer needs a delegate, so its unused `val` binding and the
accompanying `@Suppress("unused")` are dropped.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The ErrorProne version applied to this codebase reports
`[PatternMatchingInstanceof]` for the classic `instanceof` + cast idiom,
which Java 16 lets us collapse into a single pattern binding.
Converted the seven flagged sites — six `equals(Object)` methods and the
task lookup in `TaskDependencies` — from
if (!(o instanceof Foo)) { return false; }
var f = (Foo) o;
to `if (!(o instanceof Foo f)) { return false; }`, relying on flow
scoping to keep the binding visible after the guard.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…time `WriteArtifactMeta.writeFile()` read `project.group`, `project.name`, `project.version`, the `artifactMeta` extension, and `project.configurations` during task execution. Accessing `Task.project` at execution time is deprecated in Gradle 9.6 (an error in Gradle 10) because it is incompatible with the configuration cache. Move that state onto the task as `@Input` properties — `artifactGroup`, `artifactId`, `artifactVersion`, and `dependencyCoordinates` — wired by `ArtifactMetaPlugin` from lazy providers at configuration time. The dependency-collection logic (configuration filtering, `Dependency` -> `MavenArtifact`) moves into the plugin; the task rebuilds the artifacts from their coordinate strings, which round-trip losslessly through `MavenArtifact.withCoordinates`. Coordinates are captured as `String`s so the inputs stay serializable for the configuration cache. The task action no longer touches `project`. Behavior is unchanged — all `ArtifactMetaPluginSpec` cases (discovery, test-configuration filtering, explicit exclusions, explicitly declared dependencies) pass, and the freshly built plugin emits no `Task.project` deprecation. Note: the self-build still reports the deprecation because it applies the previously published dogfooding plugin (`2.0.0-SNAPSHOT.403`); that clears once a version carrying this change is published. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adopting pattern-matching `instanceof` (previous commit) removed the
intermediate cast statement that used to separate the `instanceof` guard
from the final `return`. In the two single-field `equals()` methods that
left `if (!(o instanceof X v)) { return false; }` — and then
`if (this == o) { return true; }` — directly adjacent to a boolean
`return`, which PMD's `SimplifyBooleanReturns` (Design ruleset) rejects,
failing `:tool-base:pmdMain`.
Collapse both methods to a single expression with no `if`, which PMD
cannot flag and which keeps the pattern binding ErrorProne asked for:
return this == o || o instanceof X v && field.equals(v.field);
`&&` binds tighter than `||`, so no parentheses are needed (avoiding
PMD `UselessParentheses`). The multi-field `equals()` methods keep their
guard-clause form — PMD does not flag those, and the guard clauses read
better with several conditions.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The `config` update and the version bump to `2.0.0-SNAPSHOT.404` changed the resolved dependency set (notably ErrorProne `2.36.0` -> `2.42.0`, whose newer `PatternMatchingInstanceof` check drove the `instanceof` modernization on this branch) but left the generated dependency reports untouched. Regenerate them so the documentation matches the actual dependencies. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request updates the build/tooling baseline to align with the latest config submodule state (Gradle 9.6.1 + ErrorProne bump) and then applies the necessary code and build-script adjustments to restore clean builds, remove deprecation warnings, and refresh generated dependency reports.
Changes:
- Migrated build scripts away from deprecated Kotlin DSL patterns (
by extra,tasks.getting,registering) and updated the Gradle wrapper to 9.6.1. - Removed a now-obsolete Gradle Problems-service workaround in
PlugableProjectSpecand modernized several Javaequals()/instanceofusages to avoid ErrorProne warnings. - Refactored artifact-metadata generation to avoid accessing
Task.projectduring task execution, and regenerated dependency documentation outputs.
Reviewed changes
Copilot reviewed 130 out of 135 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| version.gradle.kts | Switch publishing version declaration to extra.set(...). |
| tool-base/src/main/java/io/spine/tools/fs/ExternalModules.java | Simplify equals() with pattern matching. |
| tool-base/src/main/java/io/spine/tools/fs/ExternalModule.java | Use pattern binding in equals(). |
| tool-base/src/main/java/io/spine/tools/fs/DirectoryPattern.java | Header URL/year update + pattern binding in equals(). |
| tool-base/src/main/java/io/spine/tools/dart/fs/ImportStatement.java | Use pattern binding in equals(). |
| tool-base/src/main/java/io/spine/tools/code/Line.java | Header year update + simplify equals(). |
| tool-base/src/main/java/io/spine/tools/code/IndentedLine.java | Header year update + pattern binding in equals(). |
| protobuf-setup-plugins/build.gradle.kts | Replace deprecated Kotlin DSL accessors (extra, tasks.getting). |
| plugin-base/src/test/kotlin/io/spine/tools/gradle/project/PlugableProjectSpec.kt | Remove obsolete Gradle Problems workaround + minor Kotlin cleanup. |
| plugin-base/src/main/java/io/spine/tools/gradle/task/TaskDependencies.java | Use pattern binding for Task instanceof checks. |
| jvm-tool-plugins/src/main/kotlin/io/spine/tools/gradle/jvm/plugin/WriteArtifactMeta.kt | Refactor task inputs to avoid Task.project usage at execution time. |
| jvm-tool-plugins/src/main/kotlin/io/spine/tools/gradle/jvm/plugin/ArtifactMetaPlugin.kt | Wire task inputs at configuration time and collect dependency coordinates. |
| jvm-tool-plugins/build.gradle.kts | Replace deprecated Kotlin DSL accessors (extra, tasks.getting). |
| gradlew.bat | Wrapper script updated as part of Gradle wrapper update (generated file). |
| gradlew | Wrapper script updated as part of Gradle wrapper update (generated file). |
| gradle/wrapper/gradle-wrapper.properties | Bump Gradle distribution URL to 9.6.1. |
| gradle-root-plugin/build.gradle.kts | Replace deprecated Kotlin DSL accessors (extra, tasks.getting). |
| docs/dependencies/pom.xml | Regenerated dependency POM for snapshot .404. |
| docs/dependencies/dependencies.md | Regenerated dependency/license report for snapshot .404. |
| buildSrc/src/test/kotlin/io/spine/gradle/VersionGradleFileSpec.kt | Add tests for extra.set(...) parsing (config-managed area). |
| buildSrc/src/test/kotlin/io/spine/gradle/report/pom/DependencyWriterSpec.kt | Add resolution-version behavior tests (config-managed area). |
| buildSrc/src/test/kotlin/io/spine/gradle/fs/SpineTempDirSpec.kt | New test for temp-dir namespace and creation (config-managed area). |
| buildSrc/src/test/kotlin/io/spine/gradle/fs/LazyTempPathSpec.kt | New tests for lazy temp path behavior (config-managed area). |
| buildSrc/src/main/resources/dokka/styles/custom-styles.css | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/write-manifest.gradle.kts | Replace deprecated task registration idiom (config-managed area). |
| buildSrc/src/main/kotlin/uber-jar-module.gradle.kts | Replace deprecated tasks.getting usage (config-managed area). |
| buildSrc/src/main/kotlin/test-module.gradle.kts | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/pmd-settings.gradle.kts | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/module-testing.gradle.kts | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/kmp-publish.gradle.kts | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/kmp-module.gradle.kts | Gradle 10 Kotlin DSL adjustments + jvmTest logging setup (config-managed area). |
| buildSrc/src/main/kotlin/jvm-module.gradle.kts | Replace deprecated registering idiom (config-managed area). |
| buildSrc/src/main/kotlin/jacoco-kotlin-jvm.gradle.kts | Remove deprecated JaCoCo script plugin (config-managed area). |
| buildSrc/src/main/kotlin/jacoco-kmm-jvm.gradle.kts | Remove deprecated JaCoCo script plugin (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/VersionGradleFile.kt | Support extra.set(...) format in version-file parsing (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/testing/TestKitCoverage.kt | Use centralized JaCoCo agent coordinates (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/testing/SpineCompilerCoverage.kt | New helper to capture coverage from forked compiler JVMs (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/testing/Multiproject.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/testing/Logging.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/TaskName.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/StringExtensions.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/RunBuild.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/report/pom/SpineLicense.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/report/pom/ProjectMetadata.kt | Kotlin DSL delegate compatibility updates (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/report/pom/PomXmlWriter.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/report/pom/PomFormatting.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/report/pom/ModuleDependency.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/report/pom/MarkupExtensions.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/report/pom/InceptionYear.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/report/pom/DependencyWriter.kt | Report resolved versions instead of requested ones (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/report/pom/DependencyScope.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/report/license/Template.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/report/license/Tasks.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/report/license/ProjectDependencies.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/report/license/MarkdownReportRenderer.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/report/license/Configuration.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/SiblingCoverage.kt | Expose binary-report consumer predicate for reuse (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/KoverConfig.kt | Include compiler-fork exec files into root coverage aggregation (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/repo/RepoSlug.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/repo/Credentials.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/publish/StandardJavaPublicationHandler.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/publish/PublishingRepos.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/publish/ProtoExts.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/publish/CloudRepo.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/publish/CloudArtifactRegistry.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/javascript/plugin/Protobuf.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/javascript/plugin/McJs.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/javascript/plugin/JsPlugins.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/javascript/plugin/Idea.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/javascript/JsContext.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/javadoc/JavadocTag.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/javadoc/JavadocConfig.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/javadoc/Encoding.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/javac/Javac.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/javac/ErrorProne.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/github/pages/UpdateGitHubPagesExtension.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/github/pages/Update.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/github/pages/AuthorEmail.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/git/UserInfo.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/git/Branch.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/fs/SpineTempDir.kt | New per-JVM temp-dir base with shutdown cleanup (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/fs/LazyTempPath.kt | Create temp dirs under shared base directory (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/dart/plugin/Protobuf.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/dart/plugin/DartPlugins.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/dart/DartContext.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/Clean.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/checkstyle/CheckStyleConfig.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/Build.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/gradle/base/Tasks.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/docs/MarkdownDocument.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/dependency/test/TestKitTruth.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/dependency/test/SystemLambda.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/dependency/test/OpenTest4J.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/dependency/test/Kover.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/dependency/test/Kotest.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/dependency/test/Jacoco.kt | Add Jacoco.agent coordinate constant (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/dependency/test/Hamcrest.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/dependency/test/AssertK.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/dependency/local/Validation.kt | Bump Validation version constant (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/dependency/local/ToolBase.kt | Bump ToolBase version constants (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/dependency/local/Time.kt | Bump Time version constant (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/dependency/local/TestLib.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/dependency/local/Spine.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/dependency/local/Reflect.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/dependency/local/ModelCompiler.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/dependency/local/Logging.kt | Bump Logging version constant (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJvm.kt | Bump CoreJvm version constant (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/dependency/local/Compiler.kt | Bump Compiler fallback versions (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/dependency/local/Change.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/dependency/local/BaseTypes.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/dependency/local/Base.kt | Bump Base versions (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/KotlinX.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/Klaxon.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/JavaX.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/JavaPoet.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/JavaJwt.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/Jackson.kt | Bump Jackson BOM version (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/Coroutines.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/BouncyCastle.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/AppEngine.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/dependency/lib/ApacheHttp.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/dependency/kotlinx/KotlinX.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/dependency/build/ErrorProne.kt | Bump ErrorProne version + document Java 17 constraint (config-managed area). |
| buildSrc/src/main/kotlin/io/spine/dependency/boms/Boms.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/DocumentationSettings.kt | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/detekt-code-analysis.gradle.kts | Header year update (config-managed area). |
| buildSrc/src/main/kotlin/BuildSettings.kt | Header year update (config-managed area). |
| buildSrc/settings.gradle.kts | Header year update (config-managed area). |
| buildSrc/quality/checkstyle.xml | Header year update (config-managed area). |
| buildSrc/quality/checkstyle-suppressions.xml | Header year update (config-managed area). |
| .idea/misc.xml | Remove tracked IDE-local file (IDE config churn cleanup). |
| .idea/kotlinc.xml | Update Kotlin compiler settings for IDE sync. |
| .gitignore | Keep IDE-local files ignored; add Claude scratch/settings ignores. |
| .claude/settings.json | Claude Code settings update (plans dir + permissions). |
Files not reviewed (2)
- .idea/kotlinc.xml: Generated file
- .idea/misc.xml: Generated file
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #187 +/- ##
============================================
- Coverage 90.73% 90.73% -0.01%
+ Complexity 554 547 -7
============================================
Files 122 122
Lines 2246 2245 -1
Branches 313 313
============================================
- Hits 2038 2037 -1
Misses 86 86
Partials 122 122 🚀 New features to boost your workflow:
|
armiol
approved these changes
Jul 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updates the
configsubmodule — which moves the build to Gradle 9.6.1 and bumps ErrorProne to 2.42.0 — and fixes the resulting test-compilation breakage and build warnings.What changed
Gradle 9.6.1 API migration (compilation fix)
PlugableProjectSpecreferencedorg.gradle.api.problems.internal.*types that Gradle 9.6.1 renamed/reshaped (InternalProblems→ProblemsInternal,InternalProblemReporter→ProblemReporterInternal, …), breaking:plugin-base:compileTestKotlin. Those stubs were a workaround for gradle/gradle#31862, which was fixed in Gradle 8.14 — so on 9.6.1ProjectBuilderinitializes the Problems service itself and the workaround is dead code. Deleted it (theProblemsProgressEventEmitterHolder.init(...)call, both stub classes, and 14 imports) rather than re-shape fragile internal-API stubs that would break again on the next upgrade.Build warnings
val x: T by extra→extra["x"] as T;val t: Task by tasks.getting {}→tasks.getByName("t") {}, across thegradle-root-plugin,jvm-tool-plugins, andprotobuf-setup-pluginsbuild scripts.[PatternMatchingInstanceof](7): modernized theinstanceof+ cast idiom to Java-16 pattern binding. These surfaced from the ErrorProne2.36.0→2.42.0bump that theconfigupdate brought in.Task.projectat execution (configuration-cache-incompatible): refactoredWriteArtifactMetato snapshot the project state it needs — group, version, artifact ID, and dependency coordinates — into@Inputtask properties wired byArtifactMetaPluginat configuration time. The task action no longer accessesproject. Behavior is preserved: dependency coordinates round-trip losslessly throughMavenArtifact.coordinates/withCoordinatesas serializableStrings.Follow-up cleanups
equals()methods to a single expression to satisfy PMDSimplifyBooleanReturns(the pattern-matching change removed the intervening cast, leaving a guard adjacent to the return).docs/dependencies/*for2.0.0-SNAPSHOT.404and the updated dependency set.Verification
./gradlew build dokkaGenerate— green.tool-base222/222 (1 skipped),plugin-base106/106,jvm-tool-plugins12/12 (incl. theArtifactMetaPluginSpecGradleRunner suite that pins the dependency-collection behavior).spine-code-review,kotlin-engineer,review-docs): all APPROVE, no Must-fix / Should-fix.Notes for reviewers
Project.getProperties(Gradle Doctor plugin internals),Project-as-dependency notation (Kover'sPrepareKover), andReportingExtension.file(config'sdetekt-code-analysis.gradle.kts). The first two need upstream dependency bumps; the third belongs to aconfig-repo change.WriteArtifactMetaself-build warning: the self-build applies the published dogfooding plugin (2.0.0-SNAPSHOT.403), so it still reports theTask.projectdeprecation until a version carrying this fix is published. The freshly built plugin is clean (verified — the GradleRunner tests emit no such warning).tasks.getByName(...)→tasks.named(...)(lazy). It's a non-blocking configuration-avoidance nicety; kept asgetByNamehere because that's Gradle's literal recommended replacement for the deprecatedgettingand is behavior-identical.🤖 Generated with Claude Code