-
-
Notifications
You must be signed in to change notification settings - Fork 769
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
Kotlin 1.6.10 #4277
Kotlin 1.6.10 #4277
Conversation
We need API version 1.4 for Gradle 7.x compatibility. This creates a warning in Kotlin 1.6.
Codecov Report
@@ Coverage Diff @@
## main #4277 +/- ##
============================================
+ Coverage 84.24% 84.33% +0.09%
- Complexity 3258 3269 +11
============================================
Files 472 473 +1
Lines 10293 10340 +47
Branches 1813 1825 +12
============================================
+ Hits 8671 8720 +49
- Misses 666 668 +2
+ Partials 956 952 -4
Continue to review full report at Codecov.
|
Should we hold on till we release 1.19.0 for this one? |
fbaf1eb
to
895b8f6
Compare
We're keeping the current classloader setup as the default mode, so if we need API version 1.4 today for that, we'll still need it (we should actually use API version 1.3 for compatibility with Gradle 6.x but that's another issue). |
// Usage: <code>./gradlew build -PwarningsAsErrors=true</code>. | ||
// Note: currently there are warnings for detekt-gradle-plugin that seemingly can't be fixed | ||
// until Gradle releases an update (https://github.com/gradle/gradle/issues/16345) | ||
allWarningsAsErrors = when (project.name) { |
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.
Should I close https://github.com/detekt/detekt/pull/3835/files
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.
Maybe relevant - https://blog.mbonnin.net/use-kotlin-15-in-your-gradle-plugins
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'm not sure the allWarningsAsErrors
should be removed for the Gradle plugin
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.
Currently it's only off for the Gradle plugin because of the mismatched version warning.
This change turns it off for all modules (I'm not sure why).
I believe the article I linked above provides a workaround for the mismatched version issue.
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.
This change turns it off for all modules (I'm not sure why).
Because API version 1.4 is deprecated in Kotlin 1.6. All modules currently use API version 1.4, generating a deprecation warning. If warnings as errors is enabled the build then fails, so it has to be disabled.
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'll just add that if API version used for all modules needs to change, or we make changes to the Gradle plugin build config, we should do that in another PR first. But as it stands, warnings as errors needs to be disabled to upgrade to 1.6.
// Usage: <code>./gradlew build -PwarningsAsErrors=true</code>. | ||
// Note: currently there are warnings for detekt-gradle-plugin that seemingly can't be fixed | ||
// until Gradle releases an update (https://github.com/gradle/gradle/issues/16345) | ||
allWarningsAsErrors = when (project.name) { |
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'm not sure the allWarningsAsErrors
should be removed for the Gradle plugin
detekt-gradle-plugin/src/test/kotlin/io/gitlab/arturbosch/detekt/DetektJvmSpec.kt
Outdated
Show resolved
Hide resolved
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.
Can we land this?
Compose just upgraded the kotlin dependency to 1.6.10 - https://developer.android.com/jetpack/androidx/releases/compose-kotlin. So it would be good for us to keep up the release cycle. |
I can't build the project locally after this change. I get this error: ./gradlew detektMain
Type-safe dependency accessors is an incubating feature.
Type-safe project accessors is an incubating feature.
> Task :build-logic:jar
:jar: A valid plugin descriptor was found for releasing.properties but the implementation class ReleasingPlugin was not found in the jar.
:jar: A valid plugin descriptor was found for packaging.properties but the implementation class PackagingPlugin was not found in the jar.
:jar: A valid plugin descriptor was found for module.properties but the implementation class ModulePlugin was not found in the jar.
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/brais/projects/detekt/build.gradle.kts' line: 4
* What went wrong:
An exception occurred applying plugin request [id: 'releasing']
> Could not find implementation class 'ReleasingPlugin' for plugin 'releasing' specified in jar:file:/Users/brais/.gradle/caches/jars-9/ef0048994d61d2bf5b1eedae8d931857/build-logic.jar!/META-INF/gradle-plugins/releasing.properties. |
Try clearing It might be some local problem, I didn't see that issue... |
https://blog.jetbrains.com/kotlin/2021/11/kotlin-1-6-0-is-released/
Fixes #4287