Skip to content

Migrate to version catalogs #2704

Closed
Closed

Description

@Goooler

All dependencies including these

spotless/lib/build.gradle

Lines 73 to 137 in a0ac600

compileOnly 'org.slf4j:slf4j-api:2.0.17'
testCommonImplementation 'org.slf4j:slf4j-api:2.0.17'
// zero runtime reqs is a hard requirements for spotless-lib
// if you need a dep, put it in lib-extra
testCommonImplementation "org.junit.jupiter:junit-jupiter:$VER_JUNIT"
testCommonImplementation "org.assertj:assertj-core:$VER_ASSERTJ"
testCommonImplementation "com.diffplug.durian:durian-testlib:$VER_DURIAN"
testCommonImplementation projects.testlib
testCommonRuntimeOnly "org.junit.platform:junit-platform-launcher"
// GLUE CODE (alphabetic order please)
// cleanthat
String VER_CLEANTHAT='2.23'
cleanthatCompileOnly "io.github.solven-eu.cleanthat:java:$VER_CLEANTHAT"
compatCleanthat2Dot1CompileAndTestOnly "io.github.solven-eu.cleanthat:java:$VER_CLEANTHAT"
// diktat old supported version 1.x
compatDiktat1Dot2Dot5CompileOnly "org.cqfn.diktat:diktat-rules:1.2.5"
// diktat latest supported version 2.x
compatDiktat2Dot0Dot0CompileOnly "com.saveourtool.diktat:diktat-runner:2.0.0"
// flexmark
flexmarkCompileOnly 'com.vladsch.flexmark:flexmark-all:0.64.8'
// gherkin
gherkinCompileOnly 'io.cucumber:gherkin-utils:9.2.0'
gherkinCompileOnly 'org.slf4j:slf4j-api:2.0.17'
// googleJavaFormat
googleJavaFormatCompileOnly 'com.google.googlejavaformat:google-java-format:1.28.0'
// gson
gsonCompileOnly 'com.google.code.gson:gson:2.13.2'
// jackson
String VER_JACKSON='2.20.0'
jacksonCompileOnly "com.fasterxml.jackson.core:jackson-databind:$VER_JACKSON"
jacksonCompileOnly "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:$VER_JACKSON"
// ktfmt
ktfmtCompileOnly "com.facebook:ktfmt:0.59"
ktfmtCompileOnly("com.google.googlejavaformat:google-java-format") {
version {
strictly '1.7' // for JDK 8 compatibility
}
}
// ktlint oldest supported version
compatKtLint0Dot48Dot0CompileAndTestOnly 'com.pinterest.ktlint:ktlint-core:0.48.0'
compatKtLint0Dot48Dot0CompileAndTestOnly 'com.pinterest.ktlint:ktlint-ruleset-experimental:0.48.0'
compatKtLint0Dot48Dot0CompileAndTestOnly 'com.pinterest.ktlint:ktlint-ruleset-standard:0.48.0'
// ktlint previous supported version
compatKtLint0Dot49Dot0CompileAndTestOnly 'com.pinterest.ktlint:ktlint-rule-engine:0.49.0'
compatKtLint0Dot49Dot0CompileAndTestOnly 'com.pinterest.ktlint:ktlint-ruleset-standard:0.49.0'
compatKtLint0Dot49Dot0CompileAndTestOnly 'org.slf4j:slf4j-api:2.0.17'
// ktlint previous supported version
compatKtLint0Dot50Dot0CompileAndTestOnly 'com.pinterest.ktlint:ktlint-rule-engine:0.50.0'
compatKtLint0Dot50Dot0CompileAndTestOnly 'com.pinterest.ktlint:ktlint-ruleset-standard:0.50.0'
compatKtLint0Dot50Dot0CompileAndTestOnly 'org.slf4j:slf4j-api:2.0.17'
// ktlint latest supported version
compatKtLint1Dot0Dot0CompileAndTestOnly 'com.pinterest.ktlint:ktlint-rule-engine:1.0.0'
compatKtLint1Dot0Dot0CompileAndTestOnly 'com.pinterest.ktlint:ktlint-ruleset-standard:1.0.0'
compatKtLint1Dot0Dot0CompileAndTestOnly 'org.slf4j:slf4j-api:2.0.17'
// palantirJavaFormat
palantirJavaFormatCompileOnly 'com.palantir.javaformat:palantir-java-format:1.1.0' // this version needs to stay compilable against Java 8 for CI Job testNpm
// scalafmt
scalafmtCompileOnly "org.scalameta:scalafmt-core_2.13:3.8.1"
// sortPom
sortPomCompileOnly 'com.github.ekryd.sortpom:sortpom-sorter:4.0.0'
sortPomCompileOnly 'org.slf4j:slf4j-api:2.0.17'
// zjsonPatch
zjsonPatchCompileOnly 'com.flipkart.zjsonpatch:zjsonpatch:0.4.16'

Activity

  1. added theissue type on Oct 28, 2025
  2. nedtwigg commented on Nov 3, 2025

    @nedtwigg
    Member

    For a project with lots of modules, and you want the same dependency across them all, I think version catalogs are helpful.

    When a dependency is only used in one place, I think version catalogs are an unnecessary layer of indirection.

    Spotless does not have a large number of modules, and most dependencies are only used in one place, so I don't think a version catalog will make things easier.

    I'm still open to this though. What am I missing?

  3. Goooler commented on Nov 4, 2025

    @Goooler
    MemberAuthor

    This is mostly useful for #2705.

  4. nedtwigg commented on Nov 5, 2025

    @nedtwigg
    Member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions