-
Notifications
You must be signed in to change notification settings - Fork 160
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
Cannot choose between the following variants of com.pinterest:ktlint:0.41.0 #458
Comments
Wild guess - do you have For me using KtLInt |
@Tapchicoma yes we do have This works; ktlint {
android = true
} This doesn't work; ktlint {
android = true
version = "0.41.0"
} Created a sample repo for you: https://github.com/nuhkoca/ktlint-sample |
I see that running |
Doing this diff solves the issue:
Generally it is not advised to use mix of old Though changing in sample project |
@Tapchicoma yes, using the new |
@Tapchicoma seems, we have an answer here What do you think of it? Could it be feasible in the plugin in the near future? |
@nuhkoca to workaround the issue you could temporary add following code into configurations.named("ktlint").configure {
resolutionStrategy {
dependencySubstitution {
substitute module("com.pinterest:ktlint") with variant(module("com.pinterest:ktlint:0.41.0")) {
attributes {
attribute(Bundling.BUNDLING_ATTRIBUTE, objects.named(Bundling, Bundling.EXTERNAL))
}
}
}
}
} |
Thank you @Tapchicoma I'll do it as a workaround for now. So will you fix this this in the next release? |
Will be included into #459 PR. |
If someone want the workaroud using Kotlin DSL: configurations.named("ktlint").configure {
resolutionStrategy {
dependencySubstitution {
substitute(module("com.pinterest:ktlint")).with(variant(module("com.pinterest:ktlint:0.41.0")) {
attributes {
attribute(Bundling.BUNDLING_ATTRIBUTE, objects.named(Bundling::class, Bundling.EXTERNAL))
}
})
}
}
} |
I have upgraded
ktlint
from0.40.0
to0.41.0
. However, I am getting below error when I run./gradlew ktlintCheck
. There is no change in my config between two versions. How do I fix this? Thank you.Sorry, since it is a private repo, I am posting the relative parts here.
ktlint configuration
.editorconfig
Working env
The text was updated successfully, but these errors were encountered: