Bump CoreJvm and exclude JetBrains Annotations from the published plugin graph#83
Open
alexander-yevsyukov wants to merge 20 commits into
Open
Bump CoreJvm and exclude JetBrains Annotations from the published plugin graph#83alexander-yevsyukov wants to merge 20 commits into
alexander-yevsyukov wants to merge 20 commits into
Conversation
Replace the deprecated `val compilerVersion: String by extra` property delegate with the explicit `extra["compilerVersion"] as String` form recommended by the Gradle 9.6 upgrading guide. Covers all four `tests/` composite-build scripts (`tests`, `compiler-extension`, `consumer`, `in-place-consumer`), matching the form already used in `gradle-plugin/build.gradle.kts`. Copyright headers on the touched files were refreshed to 2026 by the repository's copyright automation. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Gradle pins `org.jetbrains:annotations` on build script classpaths to the version used by the Kotlin runtime embedded into Gradle (`strictly 13.0`, "Pinned to the embedded Kotlin"), while `kotlinx-coroutines` — brought by Aedile and other transitive dependencies — requires `23.0.0`. Gradle 9.6 may fail to reconcile the two declarations depending on the shape of the consumer's dependency graph: the CoreJvm `.510 -> .521` bump reshaped the graph enough to make the Compiler Gradle plugin unresolvable in consumer builds unless they force the module on the build script classpath. Exclude the module from the Aedile dependency of `:api` and from every published dependency of `:gradle-plugin`, so consumers need no workaround. The annotations are compile-time metadata, not needed at run time; consumers still receive version `13.0` through the `kotlin-stdlib` edge, which satisfies the pin. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This reverts commit 424db14. The Compiler Gradle plugin now excludes `org.jetbrains:annotations` from its published dependencies, so the fixture projects resolve without forcing the module. Keeping the fixtures force-free makes `functionalTest` guard against regressions of the exclusion. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The `consumer` and `in-place-consumer` fixtures put only the Compiler Gradle plugin on their build script classpaths, and the plugin no longer carries the `org.jetbrains:annotations:23.0.0` requirement. The `compiler-extension` fixture keeps the force — its classpath also holds the CoreJvm Compiler plugin, which still requires the module — with a comment stating the removal condition. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Addresses the code-review finding: the force was replaced, not augmented, when the JetBrains Annotations workaround landed. The integration tests pass without it on the CoreJvm `.521` bump, so the comment records why it is gone instead of restoring it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Convert the CoreJvm force-removal condition to the Spine `TODO:` format so it surfaces in TODO sweeps, align the embedded-Kotlin phrasing between the two exclusion comments, and use `at runtime` per the style catalog. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Spine Compiler build and published Gradle plugin metadata to remain resolvable on Gradle 9.6 buildscript classpaths, primarily by excluding org.jetbrains:annotations from published dependency edges (avoiding Gradle’s {strictly 13.0} pin conflicts), while also bumping CoreJvm and refreshing generated dependency reports.
Changes:
- Bump compiler version to
2.0.0-SNAPSHOT.064and CoreJvm to2.0.0-SNAPSHOT.522, including adaptingViewRepositoryusage to upstream API changes. - Exclude
org.jetbrains:annotationsfrom the published dependency graph (Aedile in:api, plus published dependencies of:gradle-pluginvia a helper). - Remove/reduce consumer-side workarounds in test fixtures, and apply Gradle 9.6 deprecation fixes in build scripts and dependency docs.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| version.gradle.kts | Bumps the compiler version used across publishing and integration tests. |
| buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJvm.kt | Updates the CoreJvm version to .522. |
| api/src/main/kotlin/io/spine/tools/compiler/plugin/View.kt | Removes the logName() override to match upstream CoreJvm API changes. |
| api/build.gradle.kts | Excludes org.jetbrains:annotations from the Aedile dependency to prevent publishing the conflicting requirement. |
| gradle-plugin/build.gradle.kts | Adds excludeJetBrainsAnnotations() and applies it to published dependencies to keep the plugin resolvable on Gradle 9.6 buildscript classpaths. |
| backend/build.gradle.kts | Updates performanceTest task registration to avoid Gradle 9.6 deprecations. |
| tests/build.gradle.kts | Switches away from deprecated by extra delegate usage for compilerVersion. |
| tests/consumer/build.gradle.kts | Removes deprecated by extra usage for compilerVersion in the buildscript. |
| tests/in-place-consumer/build.gradle.kts | Removes deprecated by extra usage for compilerVersion in the buildscript. |
| tests/compiler-extension/build.gradle.kts | Keeps the annotations force for the CoreJvm Compiler plugin classpath while removing the no-longer-needed grpcContext force; updates compilerVersion access. |
| docs/dependencies/pom.xml | Regenerates pinned versions reflecting the new compiler/CoreJvm/logging versions. |
| docs/dependencies/dependencies.md | Regenerates the dependency/license report reflecting the new published dependency graph (including annotations resolved via the pinned path). |
| .agents/memory/MEMORY.md | Adds a memory index entry documenting the annotations pin diagnosis and mitigation. |
| .agents/memory/feedback/gradle-annotations-pin-exclusion.md | Adds a team-memory writeup documenting the producer-side exclusion pattern and rationale. |
Gradle 9.6 deprecates the Kotlin DSL delegated-property helpers. Fix the
two occurrences in the `functionalTest` fixture build scripts:
- `coverage-agent-test`: `val jacocoAgent by configurations.creating`
becomes `configurations.create("jacocoAgent")`.
- `with-functional-test`: the `by getting` / `by registering` test-suite
delegates become the direct `register<JvmTestSuite>("functionalTest")`
API. The empty `test` access existed only to exercise the `by getting`
delegate, so it and its now-obsolete `@Suppress("UNUSED_VARIABLE")`
are removed.
Verified by the `LaunchTaskCoverageSpec` and `PluginSpec` functional
tests, which build these fixtures.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #83 +/- ##
============================================
+ Coverage 76.87% 76.89% +0.01%
Complexity 688 688
============================================
Files 205 205
Lines 4026 4025 -1
Branches 402 402
============================================
Hits 3095 3095
+ Misses 801 800 -1
Partials 130 130 🚀 New features to boost your workflow:
|
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.
Bumps CoreJvm to
2.0.0-SNAPSHOT.522and makes the Compiler Gradle plugin resolvable on Gradle 9.6 build script classpaths without consumer-side workarounds.What changed
2.0.0-SNAPSHOT.510→.522(via.511and.521), adjustingView.ktfor the upstream removal ofViewRepository.logName().org.jetbrains:annotationsto{strictly 13.0}on build script classpaths ("Pinned to the embedded Kotlin"), whilekotlinx-coroutines(via Aedile and others) requires23.0.0. Whether Gradle 9.6 reconciles the two turned out to be dependency-graph-shape sensitive: the CoreJvm bump reshaped the graph enough to make the plugin unresolvable in consumer builds. The module is now excluded from the Aedile dependency of:apiand from every published dependency of:gradle-plugin(documented helperexcludeJetBrainsAnnotations()). The annotations are compile-time metadata; consumers still receive13.0through thekotlin-stdlibedge, which satisfies the pin.force(JetBrainsAnnotations.lib)additions are reverted in the functional-test fixture templates and removed from theconsumerandin-place-consumerfixtures, so the integration tests now guard the exclusion against regressions.compiler-extensionkeeps its force — its classpath also holds the CoreJvm Compiler plugin, which still carries the requirement — with aTODO:stating the removal condition.tasks.register<Test>("performanceTest")inbackend, andextra["compilerVersion"] as Stringinstead of the deprecatedby extradelegate across thetests/build scripts.Verification
./gradlew build dokkaGenerategreen at HEAD, including:gradle-plugin:functionalTest(force-free fixtures) and:integrationTest.kotlin("jvm") 2.3.21+com.google.protobuf+id("io.spine.compiler")resolved from Maven Local with no forces — fails against the.063-era metadata and passes with this branch's artifacts.dependency-auditandkotlin-engineerapproved;spine-code-reviewandreview-docsapproved with changes, both addressed (grpcContextforce drop documented; removal condition converted to SpineTODO:format).Notes for reviewers
.522artifacts (spine-core,spine-client,spine-server) currently exist in the developer's Maven Local; they must be available in the artifact registry before merging.excludeJetBrainsAnnotations()helper is a candidate for hoisting into the sharedconfigbuildSrconce a second repository needs it.🤖 Generated with Claude Code