Benoît Liessens
11/20/2023, 2:58 PMid("org.jlleitschuh.gradle.ktlint")
to format my kotlin sources. The plugin’s configuration extension does allow me to configure the Ktlint version to be used but I wonder whether I can achieve the same with dependency managment?
Ideally I would like Renovate Bot to raise an PR when a new Ktlint version is available. Is that feasible at all?
Thankswakingrufus
11/20/2023, 4:51 PMBenoît Liessens
11/20/2023, 5:19 PMconfigure<KtlintExtension> {
version.set("0.50.0")
}
My point is that Renovate Bot (or equivalent) does not see above version “0.50.0" as a regular dependency. (like api()
and implementation()
dependencies)
What I’m hoping to do is to set the Ktlint version to be used by the Gradle plugin like this:
dependencies {
ktlintRuleset("com.pinterest.ktlint:ktlint-ruleset-standard:1.0.1")
}
With above fragment, Renovate Bot will consider that a regular dependency with GAV coordinates and automatically create a PR whenever a new version of Ktlint is available.
Unfortunately above ktlintRuleset()
dependency does not yield the same outcome as version.set("1.0.1")
mateusz.kwiecinski
11/20/2023, 9:03 PMlibs
extension, so maybe having a dummy entry in the toml file is enough (source):
ktlint-core = { module = "com.pinterest.ktlint:ktlint-cli", version.ref = "ktlint-core" }
wakingrufus
11/21/2023, 6:58 PMBenoît Liessens
11/23/2023, 8:23 PM