Skip to content

Exclude JetBrains Annotations from published plugin dependencies - #324

Merged
alexander-yevsyukov merged 9 commits into
masterfrom
bump-local-dependencies
Aug 3, 2026
Merged

Exclude JetBrains Annotations from published plugin dependencies#324
alexander-yevsyukov merged 9 commits into
masterfrom
bump-local-dependencies

Conversation

@alexander-yevsyukov

@alexander-yevsyukov alexander-yevsyukov commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

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 config was applied bringing the latest local dependencies.

Copilot AI review requested due to automatic review settings August 3, 2026 16:47
@alexander-yevsyukov alexander-yevsyukov self-assigned this Aug 3, 2026
@alexander-yevsyukov alexander-yevsyukov moved this to In Review in v2.0 Aug 3, 2026

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 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’s implementation(...) dependencies.
  • Force io.spine.dependency.lib.JetBrainsAnnotations.lib on 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.
*/
@alexander-yevsyukov
alexander-yevsyukov merged commit ae37130 into master Aug 3, 2026
13 checks passed
@alexander-yevsyukov
alexander-yevsyukov deleted the bump-local-dependencies branch August 3, 2026 16:58
@github-project-automation github-project-automation Bot moved this from In Review to ✅ Done in v2.0 Aug 3, 2026
@codecov

codecov Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.63%. Comparing base (336d6f2) to head (70d2e24).
⚠️ Report is 10 commits behind head on master.

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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

3 participants