-
-
Notifications
You must be signed in to change notification settings - Fork 794
Function to return supported Kotlin version #6472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6472 +/- ##
=========================================
Coverage 85.18% 85.18%
Complexity 4037 4037
=========================================
Files 564 564
Lines 13273 13273
Branches 2387 2387
=========================================
Hits 11306 11306
Misses 773 773
Partials 1194 1194 ☔ View full report in Codecov by Sentry. |
detekt-gradle-plugin/src/main/kotlin/io/gitlab/arturbosch/detekt/DetektPlugin.kt
Fixed
Show fixed
Hide fixed
detekt-gradle-plugin/src/test/kotlin/io/gitlab/arturbosch/detekt/DetektPlainSpec.kt
Fixed
Show fixed
Hide fixed
detekt-gradle-plugin/src/test/kotlin/io/gitlab/arturbosch/detekt/DetektPlainSpec.kt
Fixed
Show fixed
Hide fixed
detekt-gradle-plugin/src/test/kotlin/io/gitlab/arturbosch/detekt/DetektPlainSpec.kt
Fixed
Show fixed
Hide fixed
detekt-gradle-plugin/src/test/kotlin/io/gitlab/arturbosch/detekt/DetektPlainSpec.kt
Fixed
Show fixed
Hide fixed
detekt-gradle-plugin/src/test/kotlin/io/gitlab/arturbosch/detekt/DetektPlainSpec.kt
Fixed
Show fixed
Hide fixed
detekt-gradle-plugin/src/test/kotlin/io/gitlab/arturbosch/detekt/DetektPlainSpec.kt
Fixed
Show fixed
Hide fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just want to note that while this will work in the majority of cases it is possible to change the version of detekt-cli that the plugin calls, and the resolved version of the CLI dependency might depend on a different Kotlin version which will cause failures again.
I think we can get the resolved Kotlin dependency version from Gradle though when I last tried this it didn't seem that easy. But in the meantime annotating with Incubating will at least flag in IDE that this isn't 100% stable or foolproof.
detekt-gradle-plugin/src/main/kotlin/io/gitlab/arturbosch/detekt/DetektPlugin.kt
Show resolved
Hide resolved
I thought about adding dependency to detekt-cli and query supported version from there, but I assumed that Kotlin versions would be consistent across modules. |
@3flex is there anything here that I should change or it's good to be merged? |
I vote to merge this. They should not be unaligned. And if they do we could always change this implementation without any breaking change. |
@kkocel could you also update the documentation pointing out how to use this workaround? And that it should only be needed if the user applies the spring dependency manager (I can't recall the exact name) |
Add information about the Spring Dependency Management Plugin. Update snippet to use Kotlin version resolution method.
|
@BraisGabin thank you. I added the relevant part in the future docs and mentioned Spring Dependency Plugin there. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
* Function to return supported Kotlin version * Update documentation Add information about the Spring Dependency Management Plugin. Update snippet to use Kotlin version resolution method.
* Function to return supported Kotlin version * Update documentation Add information about the Spring Dependency Management Plugin. Update snippet to use Kotlin version resolution method.
Introduce the function that returns the supported Kotlin version as mentioned in: #6198 (comment)