Skip to content
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

Merged
merged 7 commits into from Dec 18, 2021
Merged

Kotlin 1.6.10 #4277

merged 7 commits into from Dec 18, 2021

Conversation

3flex
Copy link
Member

@3flex 3flex commented Nov 16, 2021

We need API version 1.4 for Gradle 7.x compatibility. This
creates a warning in Kotlin 1.6.
@codecov
Copy link

codecov bot commented Nov 16, 2021

Codecov Report

Merging #4277 (05e0327) into main (a47a32c) will increase coverage by 0.09%.
The diff coverage is n/a.

Impacted file tree graph

@@             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     
Impacted Files Coverage Δ
.../kotlin/io/gitlab/arturbosch/detekt/cli/CliArgs.kt 100.00% <ø> (ø)
...lab/arturbosch/detekt/core/config/DefaultConfig.kt 66.66% <0.00%> (-33.34%) ⬇️
...ch/detekt/core/suppressors/AnnotationSuppressor.kt 80.76% <0.00%> (-9.24%) ⬇️
.../gitlab/arturbosch/detekt/rules/empty/EmptyRule.kt 92.30% <0.00%> (-3.15%) ⬇️
...etekt/rules/style/optional/MandatoryBracesLoops.kt 73.33% <0.00%> (-2.53%) ⬇️
...ab/arturbosch/detekt/core/config/ValidateConfig.kt 98.59% <0.00%> (-1.41%) ⬇️
...n/kotlin/io/gitlab/arturbosch/detekt/api/Entity.kt 75.00% <0.00%> (-1.20%) ⬇️
.../gitlab/arturbosch/detekt/api/internal/Versions.kt 87.50% <0.00%> (ø)
...n/io/github/detekt/report/html/HtmlOutputReport.kt 95.55% <0.00%> (ø)
...ab/arturbosch/detekt/core/config/Configurations.kt 84.37% <0.00%> (ø)
... and 18 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a47a32c...05e0327. Read the comment docs.

@cortinico cortinico added the dependencies Pull requests that update a dependency file label Nov 16, 2021
@cortinico
Copy link
Member

Should we hold on till we release 1.19.0 for this one?

@BraisGabin
Copy link
Member

@3flex #4128 should solve the reason for what you disabled the warning as errors, right?

@3flex 3flex force-pushed the kotlin-1.6 branch 2 times, most recently from fbaf1eb to 895b8f6 Compare November 16, 2021 11:23
@3flex
Copy link
Member Author

3flex commented Nov 16, 2021

#4128 should solve the reason for what you disabled the warning as errors, right?

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).

@3flex 3flex added this to the 1.20.0 milestone Nov 18, 2021
@chao2zhang chao2zhang mentioned this pull request Nov 26, 2021
// 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) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member

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

Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Member Author

@3flex 3flex Nov 30, 2021

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) {
Copy link
Member

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

@cortinico cortinico added the notable changes Marker for notable changes in the changelog label Nov 30, 2021
@3flex 3flex changed the title Kotlin 1.6.0 Kotlin 1.6.10 Dec 17, 2021
Copy link
Member

@cortinico cortinico left a 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?

@chao2zhang
Copy link
Member

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.

@3flex 3flex merged commit 4e2e8ba into main Dec 18, 2021
@3flex 3flex deleted the kotlin-1.6 branch December 18, 2021 01:06
@BraisGabin
Copy link
Member

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.

@3flex
Copy link
Member Author

3flex commented Dec 18, 2021

Try clearing /Users/brais/.gradle/caches

It might be some local problem, I didn't see that issue...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file notable changes Marker for notable changes in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support jvmTarget 17
5 participants