-
Notifications
You must be signed in to change notification settings - Fork 157
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
Support Kotlin 1.4 with ktlint 0.38.0 #383
Comments
you could set ktlint version via extension property: ktlint-gradle/plugin/src/main/kotlin/org/jlleitschuh/gradle/ktlint/KtlintExtension.kt Line 36 in fa5614c
|
Yep.
A released version of ktlint-gradle supporting 1.4 would still be nice though |
The plugin doesn't work with Kotlin 1.4.0 for me – I've tried versions 9.2.1 and 9.3.0. I've set ktlint version to 0.38.1: ktlint {
version.set("0.38.1")
verbose.set(true)
disabledRules.set(setOf("import-ordering", "no-wildcard-imports"))
} I get the folowing error:
Is it possible that not all See also: pinterest/ktlint#876. I honestly don't know where is the problem: in |
Found the issue:
I am looking how to fix it, workaround would be either:
|
Actually after further investigation in affected project I found out following gradle configuration that forcing kotlin version for all configurations: configurations.all {
resolutionStrategy {
eachDependency {
// Force Kotlin to our version
if (requested.group == "org.jetbrains.kotlin") {
useVersion("1.3.72")
}
}
}
} This enforces kotlin version also for To avoid it you should exclude |
Hi @Tapchicoma! Can you provide small example how to exclude |
@alex-t0 something like this should work: configurations.all {
if(!name.startsWith("ktlint")) {
resolutionStrategy {
eachDependency {
// Force Kotlin to our version
if (requested.group == "org.jetbrains.kotlin") {
useVersion("1.3.72")
}
}
}
}
} |
Version 0.38.0 of ktlint brings support for Kotlin 1.4.
Do you plan to release a new version ktlint-gradle supporting the new ktlint version?
The text was updated successfully, but these errors were encountered: