gradle / kotlin-dsl-conventions

Gradle Kotlin DSL conventional plugins
Other
25 stars 6 forks source link

setting ktlint version to 0.36.0 leads to a ruleset load error #1

Closed pvanek closed 4 years ago

pvanek commented 4 years ago
ktlint {
    version.set("0.36.0")
    verbose.set(true)
    outputToConsole.set(true)
    coloredOutput.set(true)
    //ignoreFailures.set(true)
    enableExperimentalRules.set(false)
}
> Task :ktlintKotlinScriptCheck FAILED
[ERROR] Cannot load custom ruleset!
[ERROR] RuleSetProvider has moved to com.pinterest.ktlint.core.
[ERROR] Please rename META-INF/services/com.github.shyiko.ktlint.core.RuleSetProvider to META-INF/services/com.pinterest.ktlint.core.RuleSetProvider

FAILURE: Build failed with an exception.

The last working version is 0.33.0

See: https://github.com/pinterest/ktlint/blob/master/ktlint/src/main/kotlin/com/pinterest/ktlint/Main.kt#L287

JLLeitschuh commented 4 years ago

This will require an update to the version of KTLint-Gradle that this project uses.

eskatos commented 4 years ago

Plugin version 0.5.0 has been updated to the latest ktlint-gradle 0.9.1 and now defaults to ktlint 0.36.0