Skip to content

Add CheckVersionCompatibility task to enforce Kotlin/Compose version#1013

Merged
egorikftp merged 1 commit into
mainfrom
task/dependency-guard
Jun 3, 2026
Merged

Add CheckVersionCompatibility task to enforce Kotlin/Compose version#1013
egorikftp merged 1 commit into
mainfrom
task/dependency-guard

Conversation

@egorikftp

Copy link
Copy Markdown
Member

📝 Changelog

If this PR introduces user-facing changes, please update the relevant Unreleased section in changelogs:

@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

This pull request adds automated validation of dependency versions for the IDEA plugin. A new Gradle task parses maximum allowed versions for Kotlin and Compose packages from configuration, resolves all implementation dependencies, compares their versions against the bounds, and reports violations. The task is registered in the IDEA plugin build with a dedicated configuration, integrated into the CI workflow to run before the build step, and accompanies updates to the version catalog including an upgraded kotlinpoet dependency and removal of an unused version reference.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description contains only the changelog template checklist without any substantive explanation of the changes, objectives, or rationale for the PR. Add a detailed description explaining what the CheckVersionCompatibility task does, why it was added, and how it works before the changelog section.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding a new CheckVersionCompatibility task to enforce version compatibility constraints.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch task/dependency-guard

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tools/idea-plugin/build.gradle.kts`:
- Around line 178-187: The new versionCompatibilityCheck configuration copies
only dependencies and not the consumer/variant selection attributes from
implementation, causing incorrect variant resolution; inside the
configurations.register("versionCompatibilityCheck") { ... } block, read the
implementation configuration's attributes
(configurations.getByName("implementation").attributes) and apply the same
attributes to the created config (use the configuration's
attributes.attribute(...) API or iterate
implementation.attributes.keySet/entries to copy each attribute), or
alternatively wire the new configuration to implementation for attribute
selection by using
extendFrom(configurations.getByName("implementation"))/configurations.named as
appropriate so the versionCompatibilityCheck configuration matches
implementation's consumer attributes and resolves the same variants (refer to
checkConfig and implementation in the block).
- Around line 172-190: The checkVersionCompatibility task is not wired into the
module lifecycle so a normal build can bypass it; hook it into the standard
verification lifecycle by making the module's "check" task depend on
checkVersionCompatibility (e.g. add a dependsOn from tasks.named("check") to the
registered CheckVersionCompatibility task or add the registered task to check's
dependsOn), referencing the registered task name checkVersionCompatibility and
the lifecycle task "check" so it runs automatically during ./gradlew check or
./gradlew build.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: bb078bc2-a2d3-49e5-b114-6a5f0726eec4

📥 Commits

Reviewing files that changed from the base of the PR and between eb0b62a and 9c2b233.

📒 Files selected for processing (4)
  • .github/workflows/validation.yml
  • build-logic/src/main/kotlin/io/github/composegears/valkyrie/task/CheckVersionCompatibility.kt
  • gradle/libs.versions.toml
  • tools/idea-plugin/build.gradle.kts

Comment thread tools/idea-plugin/build.gradle.kts
Comment thread tools/idea-plugin/build.gradle.kts
@egorikftp egorikftp merged commit 25a7156 into main Jun 3, 2026
4 checks passed
@egorikftp egorikftp deleted the task/dependency-guard branch June 3, 2026 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant