Skip to content

build: extract dependencies into three Gradle version catalogs#212

Open
Copilot wants to merge 4 commits intov3from
copilot/extract-dependencies-to-version-catalogs
Open

build: extract dependencies into three Gradle version catalogs#212
Copilot wants to merge 4 commits intov3from
copilot/extract-dependencies-to-version-catalogs

Conversation

Copy link

Copilot AI commented Mar 2, 2026

  • Create gradle/libs.versions.toml: spek version ref (used twice); kotest-framework-api as single string
  • Create gradle/testLibs.versions.toml: all entries as single strings; junit-platform-launcher now includes version 6.0.3
  • Create gradle/buildLibs.versions.toml: dokka version ref (used twice); develocity, kotlin-jvm, nexus-publish as single strings
  • settings.gradle.kts: dependencyResolutionManagement below plugins block
  • Remove constraints blocks from base, kotest, spek build files
  • Build verified passing
Original prompt

Extract all dependencies into 3 different Gradle version catalogs.

concretely:

  1. extract all production dependencies into gradle/libs.versions.toml
  2. extract all test dependencies into gradle/testLibs.versions.toml
  3. extract all build dependencies, including gradle plugins, into gradle/buildLibs.versions.toml

Then:

  1. register the version catalogs of 2. and 3. in Gradle.
  2. replace all dependency strings with references to the auto-generated accessors for the dependency catalogs.

follow best practices for dependency catalogs. in particular, use shared version numbers from the versions section for libraries that are published together and should always have the same version.


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: jGleitz <4305652+jGleitz@users.noreply.github.com>
Copilot AI changed the title [WIP] Extract all dependencies into separate Gradle version catalogs Extract dependencies into three Gradle version catalogs Mar 2, 2026
develocity = "4.3.2"
dokka = "2.1.0"
kotlin = "2.3.10"
nexus-publish = "2.0.0"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In all three catalogs: Please use version declarations (and references) only when a version is used multiple times. For any other dependency, use the single string notation.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 57fb33b. All three catalogs now only use version refs for versions shared across multiple entries:

  • libs.versions.toml: spek ref kept (used by spek-dsl-jvm and spek-runtime-jvm); kotest-framework-api uses inline string
  • testLibs.versions.toml: all versions are unique, so the [versions] section was removed entirely and all use inline strings
  • buildLibs.versions.toml: dokka ref kept (used by dokka and dokka-javadoc); all others use inline strings

Comment on lines 23 to 25
constraints {
testImplementation(kotlin("reflect"))
testImplementation(testLibs.kotlin.reflect)
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need this constraints block anymore. Please remove it from all build files. Don't forget to also remove the kotlin-reflect declaration from the dependency catalog. Run the gradle build to verify everything still works after your changes.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 57fb33b — removed the constraints block from all three build files and removed kotlin-reflect from testLibs.versions.toml. Build passes successfully.

…raints blocks

Co-authored-by: jGleitz <4305652+jGleitz@users.noreply.github.com>
Copy link
Author

Copilot AI commented Mar 2, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • docs.oracle.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED -XX:MaxMetaspaceSize=384m -XX:&#43;HeapDumpOnOutOfMemoryError -Xms256m -Xmx512m -Dfile.encoding=UTF-8 (dns block)
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java -XX:&#43;HeapDumpOnOutOfMemoryError -XX:&#43;AlwaysPreTouch @/home/REDACTED/.gradle/.tmp/gradle-worker-classpath11080276007187078935txt -Xmx2g -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant worker.org.gradle.process.internal.worker.GradleWorkerMain &#39;Gradle Worker Daemon 1&#39; (dns block)
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java -XX:&#43;HeapDumpOnOutOfMemoryError -XX:&#43;AlwaysPreTouch @/home/REDACTED/.gradle/.tmp/gradle-worker-classpath10892236788764819286txt -Xmx2g -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant worker.org.gradle.process.internal.worker.GradleWorkerMain &#39;Gradle Worker Daemon 2&#39; (dns block)
  • kotlinlang.org
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED -XX:MaxMetaspaceSize=384m -XX:&#43;HeapDumpOnOutOfMemoryError -Xms256m -Xmx512m -Dfile.encoding=UTF-8 (dns block)
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java -XX:&#43;HeapDumpOnOutOfMemoryError -XX:&#43;AlwaysPreTouch @/home/REDACTED/.gradle/.tmp/gradle-worker-classpath11080276007187078935txt -Xmx2g -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant worker.org.gradle.process.internal.worker.GradleWorkerMain &#39;Gradle Worker Daemon 1&#39; (dns block)
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java -XX:&#43;HeapDumpOnOutOfMemoryError -XX:&#43;AlwaysPreTouch @/home/REDACTED/.gradle/.tmp/gradle-worker-classpath10892236788764819286txt -Xmx2g -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant worker.org.gradle.process.internal.worker.GradleWorkerMain &#39;Gradle Worker Daemon 2&#39; (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@@ -0,0 +1,5 @@
[libraries]
atrium-fluent-en-gb = { module = "ch.tutteli.atrium:atrium-fluent-en_GB", version = "0.16.0" }
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For all dependency catalogs: please use the single string notation if there is no version reference

Suggested change
atrium-fluent-en-gb = { module = "ch.tutteli.atrium:atrium-fluent-en_GB", version = "0.16.0" }
atrium-fluent-en-gb = "ch.tutteli.atrium:atrium-fluent-en_GB:0.16.0"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in a3dbaed — all entries without a version.ref now use single string notation in all three catalogs.

@@ -0,0 +1,5 @@
[libraries]
atrium-fluent-en-gb = { module = "ch.tutteli.atrium:atrium-fluent-en_GB", version = "0.16.0" }
junit-platform-launcher = { module = "org.junit.platform:junit-platform-launcher" }
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please specify the version (6.0.3) so renovate will keep it up to date.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in a3dbaedjunit-platform-launcher now includes version 6.0.3.

@jGleitz jGleitz changed the title Extract dependencies into three Gradle version catalogs build: extract dependencies into three Gradle version catalogs Mar 2, 2026
@jGleitz jGleitz marked this pull request as ready for review March 2, 2026 13:07
…form-launcher

Co-authored-by: jGleitz <4305652+jGleitz@users.noreply.github.com>
Copy link
Author

Copilot AI commented Mar 2, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • docs.oracle.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED -XX:MaxMetaspaceSize=384m -XX:&#43;HeapDumpOnOutOfMemoryError -Xms256m -Xmx512m -Dfile.encoding=UTF-8 (dns block)
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java -XX:&#43;HeapDumpOnOutOfMemoryError -XX:&#43;AlwaysPreTouch @/home/REDACTED/.gradle/.tmp/gradle-worker-classpath5677880494127694486txt -Xmx2g -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant worker.org.gradle.process.internal.worker.GradleWorkerMain &#39;Gradle Worker Daemon 1&#39; (dns block)
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java -XX:&#43;HeapDumpOnOutOfMemoryError -XX:&#43;AlwaysPreTouch @/home/REDACTED/.gradle/.tmp/gradle-worker-classpath5058302809745513869txt -Xmx2g -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant worker.org.gradle.process.internal.worker.GradleWorkerMain &#39;Gradle Worker Daemon 2&#39; (dns block)
  • kotlinlang.org
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED -XX:MaxMetaspaceSize=384m -XX:&#43;HeapDumpOnOutOfMemoryError -Xms256m -Xmx512m -Dfile.encoding=UTF-8 (dns block)
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java -XX:&#43;HeapDumpOnOutOfMemoryError -XX:&#43;AlwaysPreTouch @/home/REDACTED/.gradle/.tmp/gradle-worker-classpath5677880494127694486txt -Xmx2g -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant worker.org.gradle.process.internal.worker.GradleWorkerMain &#39;Gradle Worker Daemon 1&#39; (dns block)
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java -XX:&#43;HeapDumpOnOutOfMemoryError -XX:&#43;AlwaysPreTouch @/home/REDACTED/.gradle/.tmp/gradle-worker-classpath5058302809745513869txt -Xmx2g -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant worker.org.gradle.process.internal.worker.GradleWorkerMain &#39;Gradle Worker Daemon 2&#39; (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR restructures dependency management by splitting dependencies and Gradle plugins into three separate version catalogs (prod/test/build) and updating build scripts to use the generated catalog accessors across the project.

Changes:

  • Added three version catalogs: libs (prod), testLibs (test-only), and buildLibs (build + plugins).
  • Registered testLibs and buildLibs catalogs in settings.gradle.kts.
  • Replaced inline dependency/plugin coordinates in build scripts with version-catalog accessors; removed prior constraints blocks.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
gradle/libs.versions.toml Introduces production dependency catalog entries (incl. shared Spek version ref).
gradle/testLibs.versions.toml Introduces test dependency catalog entries (as single-string notations).
gradle/buildLibs.versions.toml Introduces build/plugin catalog entries (incl. shared Dokka version ref).
settings.gradle.kts Registers testLibs and buildLibs catalogs via dependencyResolutionManagement.
build.gradle.kts Switches root plugins to buildLibs plugin aliases.
base/build.gradle.kts Replaces test dependency strings with catalog accessors; removes constraints block.
kotest/build.gradle.kts Replaces plugin + dependency strings with catalog accessors; removes constraints block.
spek/build.gradle.kts Replaces plugin + dependency strings with catalog accessors; removes constraints block.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

dokka = "2.1.0"

[plugins]
develocity = "com.gradle.develocity:4.3.2"
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

buildLibs defines the develocity plugin here, but it isn’t referenced anywhere in the build (settings.gradle.kts still hardcodes the Develocity plugin + version). This risks the catalog drifting from the actual plugin version; either switch the settings plugin declaration to use the catalog entry, or remove develocity from this catalog if it can’t be used there due to settings plugin block ordering.

Suggested change
develocity = "com.gradle.develocity:4.3.2"

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants