Exclude JetBrains Annotations from published plugin dependencies - #324
Merged
Conversation
armiol
approved these changes
Aug 3, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to prevent org.jetbrains:annotations (JetBrains Annotations) from leaking into the published Validation Gradle plugin dependency graph, avoiding consumer-side version forcing. It also applies the latest config updates, bumping snapshot versions and regenerating dependency documentation.
Changes:
- Add a
ModuleDependency.excludeJetBrainsAnnotations()helper and apply it to the published plugin’simplementation(...)dependencies. - Force
io.spine.dependency.lib.JetBrainsAnnotations.libon buildscript classpaths in root/tests build scripts to keep buildscript resolution stable. - Bump snapshot versions and refresh dependency docs (POM + generated dependency report).
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| version.gradle.kts | Bumps the published Validation version to 2.0.0-SNAPSHOT.461. |
| build.gradle.kts | Forces JetBrains Annotations on the root buildscript classpath. |
| gradle-plugin/build.gradle.kts | Excludes JetBrains Annotations from published plugin dependencies via excludeJetBrainsAnnotations(). |
| buildSrc/src/main/kotlin/BuildExtensions.kt | Introduces excludeJetBrainsAnnotations() extension and rationale KDoc. |
| tests/build.gradle.kts | Forces JetBrains Annotations on the tests buildscript classpath. |
| tests/validator/build.gradle.kts | Forces JetBrains Annotations on the validator tests buildscript classpath. |
| buildSrc/src/main/kotlin/io/spine/dependency/local/Validation.kt | Updates referenced Validation artifact version(s) used by build logic. |
| buildSrc/src/main/kotlin/io/spine/dependency/local/Compiler.kt | Updates Compiler fallback version(s) due to config refresh. |
| docs/dependencies/pom.xml | Updates dependency versions for documentation POM. |
| docs/dependencies/dependencies.md | Updates generated dependency report contents/timestamps and version headers. |
| docs/content/docs/validation/user/01-getting-started/adding-to-build.md | Updates example plugin versions for users. |
| docs/content/docs/validation/developer/build-and-release.md | Updates developer docs snippet to the new validationVersion. |
Comment on lines
+354
to
+368
| /** | ||
| * Excludes `org.jetbrains:annotations` from this published dependency. | ||
| * | ||
| * Build script classpaths pin the module to the version used by the Kotlin | ||
| * runtime embedded into Gradle (`strictly 13.0`, "Pinned to the embedded | ||
| * Kotlin"), while `kotlinx-coroutines` and other transitive dependencies of | ||
| * this plugin require `23.0.0`. Gradle 9.6 may fail to reconcile the two | ||
| * declarations — the outcome depends on the shape of the consumer's dependency | ||
| * graph — making the plugin unresolvable without a consumer-side workaround, | ||
| * such as forcing the module version on the build script classpath. | ||
| * | ||
| * The annotations are compile-time metadata, not needed at runtime. | ||
| * Consumers still receive version `13.0` through the `kotlin-stdlib` | ||
| * dependency, which satisfies the pin. | ||
| */ |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #324 +/- ##
=========================================
Coverage 92.63% 92.63%
Complexity 363 363
=========================================
Files 84 84
Lines 2090 2090
Branches 157 157
=========================================
Hits 1936 1936
Misses 110 110
Partials 44 44 🚀 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.
This PR excludes JetBrains Annotations from the dependencies of the published Validation Gradle plugin. This is needed to avoid the need for forcing the version of the Annotations in the consumer projects.
Also, the latest
configwas applied bringing the latest local dependencies.