Add CheckVersionCompatibility task to enforce Kotlin/Compose version#1013
Conversation
WalkthroughThis 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)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (4)
.github/workflows/validation.ymlbuild-logic/src/main/kotlin/io/github/composegears/valkyrie/task/CheckVersionCompatibility.ktgradle/libs.versions.tomltools/idea-plugin/build.gradle.kts
📝 Changelog
If this PR introduces user-facing changes, please update the relevant Unreleased section in changelogs: