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

Make a release built against Kotlin 1.4 #2974

Closed
sschuberth opened this issue Aug 17, 2020 · 6 comments · Fixed by #2981
Closed

Make a release built against Kotlin 1.4 #2974

sschuberth opened this issue Aug 17, 2020 · 6 comments · Fixed by #2981
Labels
build dependencies Pull requests that update a dependency file formatting
Milestone

Comments

@sschuberth
Copy link
Contributor

sschuberth commented Aug 17, 2020

Context

Kotlin 1.4 was released and we'd like to update to it, but we cannot as the compiler would issue a warning (and we break on warnings) due to detekt being built against Kotlin 1.3.72, and we cannot enforce Kotlin 1.4 due to this issue.

@arturbosch
Copy link
Member

Getting rid of the warning will also require a new Gradle release, won't it?

Kotlin 1.4 support is on the way (#2931). Unfortunately we are blocked by pinterest/ktlint#830.

@sschuberth
Copy link
Contributor Author

Getting rid of the warning will also require a new Gradle release, won't it?

Hmm, that triggers a good question for me: I actually don't want to enforce the Kotlin version on the Gradle / pluging classpath, but only on our app's compile classpath. So maybe the .all in

configurations.all {
    resolutionStrategy {
        // ..
    }
}

simply is too broad and affects the plugin classpath, too... I need to look into this.

@realdadfish
Copy link
Contributor

Buildscript (plugin) and project classpath is separated (mostly), however, certain plugins (like e.g. the kotlin allopen plugin) might require the same Kotlin version on both classpaths.

In any case, your issue @sschuberth might be resolved by this:

  configurations.all {
        resolutionStrategy.eachDependency {
            if (requested.group == "org.jetbrains.kotlin" && requested.name == "kotlin-reflect") {
                useVersion("1.4.0")
            }
        }
    }

Most likely because some runtime dependency pulls in kotlin-reflect transitively (moshi-kotlin e.g. does it).

@sschuberth
Copy link
Contributor Author

Thanks @realdadfish for the idea. I'm doing something similar but more detekt-specific currently, see

oss-review-toolkit/ort@6976ae0#diff-392475fdf2bc320d17762ed97109a121R176

@arturbosch arturbosch added this to the 1.12.0-RC1 milestone Aug 20, 2020
@arturbosch arturbosch added build dependencies Pull requests that update a dependency file and removed blocked labels Aug 20, 2020
@sschuberth
Copy link
Contributor Author

Kotlin 1.4 support is on the way (#2931). Unfortunately we are blocked by pinterest/ktlint#830.

FYI, ktlint 0.38.0 final has just been released with the fix: https://github.com/pinterest/ktlint/releases/tag/0.38.0

@arturbosch
Copy link
Member

Kotlin 1.4 support is on the way (#2931). Unfortunately we are blocked by pinterest/ktlint#830.

FYI, ktlint 0.38.0 final has just been released with the fix: https://github.com/pinterest/ktlint/releases/tag/0.38.0

I think we need to wait for a 0.38.1 and also build with language version = 1.3 - pinterest/ktlint#848

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

Successfully merging a pull request may close this issue.

3 participants