Skip to content

Commit 0a8f25b

Browse files
committed
Switch to TOML based version catalogs
1 parent 42918e8 commit 0a8f25b

4 files changed

Lines changed: 48 additions & 26 deletions

File tree

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ import org.asciidoctor.gradle.jvm.AsciidoctorTask
1111

1212
plugins {
1313
id 'java-library'
14-
id 'nu.studer.credentials' version '3.0'
14+
alias(libs.plugins.credentials)
1515
id 'maven-publish'
1616
id 'signing'
17-
id 'org.asciidoctor.jvm.convert' version '4.0.5'
17+
alias(libs.plugins.asciidoctor.jvm.convert)
1818
}
1919

2020
defaultTasks 'clean', 'build'

gradle/libs.versions.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# SPDX-FileCopyrightText: Copyright 2026 Mark Rotteveel
2+
# SPDX-License-Identifier: LGPL-2.1-or-later
3+
[versions]
4+
jna = "5.18.1"
5+
jakarta-servlet = "5.0.0"
6+
bouncy-castle = "1.83"
7+
jspecify = "1.0.0"
8+
credentials = "3.0"
9+
asciidoctor-jvm = "4.0.5"
10+
11+
[libraries]
12+
jna = { module = "net.java.dev.jna:jna-jpms", version.ref = "jna" }
13+
jakarta-servlet-api = { module = "jakarta.servlet:jakarta.servlet-api", version.ref = "jakarta-servlet" }
14+
bcprov-jdk18on = { module = "org.bouncycastle:bcprov-jdk18on", version.ref = "bouncy-castle" }
15+
jspecify = { module = "org.jspecify:jspecify", version.ref = "jspecify" }
16+
17+
[plugins]
18+
credentials = { id = "nu.studer.credentials", version.ref = "credentials" }
19+
asciidoctor-jvm-convert = { id = "org.asciidoctor.jvm.convert", version.ref = "asciidoctor-jvm" }

gradle/test-libs.versions.toml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# SPDX-FileCopyrightText: Copyright 2026 Mark Rotteveel
2+
# SPDX-License-Identifier: LGPL-2.1-or-later
3+
[versions]
4+
junit = "6.0.3"
5+
mockito = "5.23.0"
6+
hamcrest = "3.0"
7+
hamcrest-optional = "1.3.2"
8+
assertj = "3.27.7"
9+
awaitility = "4.3.0"
10+
11+
[libraries]
12+
junit-bom = { module = "org.junit:junit-bom", version.ref = "junit" }
13+
junit-jupiter = { module = "org.junit.jupiter:junit-jupiter" }
14+
junit-platform-launcher = { module = "org.junit.platform:junit-platform-launcher" }
15+
hamcrest = { module = "org.hamcrest:hamcrest", version.ref = "hamcrest" }
16+
hamcrest-optional = { module = "com.spotify:hamcrest-optional", version.ref = "hamcrest-optional" }
17+
assertj-core = { module = "org.assertj:assertj-core", version.ref = "assertj" }
18+
mockito-bom = { module = "org.mockito:mockito-bom", version.ref = "mockito" }
19+
mockito-core = { module = "org.mockito:mockito-core" }
20+
mockito-junit-jupiter = { module = "org.mockito:mockito-junit-jupiter" }
21+
awaitility = { module = "org.awaitility:awaitility", version.ref = "awaitility" }
22+
23+
[bundles]
24+
junit = ["junit-jupiter"]
25+
hamcrest = ["hamcrest", "hamcrest-optional"]
26+
mockito = ["mockito-core", "mockito-junit-jupiter"]

settings.gradle

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,8 @@ dependencyResolutionManagement {
99
}
1010

1111
versionCatalogs {
12-
libs {
13-
library('jna', 'net.java.dev.jna', 'jna-jpms').version('5.18.1')
14-
library('jakarta.servlet-api', 'jakarta.servlet', 'jakarta.servlet-api').version('5.0.0')
15-
library('bcprov-jdk18on', 'org.bouncycastle', 'bcprov-jdk18on').version('1.83')
16-
library('jspecify', 'org.jspecify', 'jspecify').version('1.0.0')
17-
}
18-
1912
testLibs {
20-
version('junit', '6.0.3')
21-
version('mockito', '5.23.0')
22-
23-
library('junit-bom', 'org.junit', 'junit-bom').versionRef('junit')
24-
library('junit-jupiter', 'org.junit.jupiter', 'junit-jupiter').withoutVersion()
25-
library('junit-platform-launcher', 'org.junit.platform', 'junit-platform-launcher').withoutVersion()
26-
library('hamcrest', 'org.hamcrest', 'hamcrest').version('3.0')
27-
library('hamcrest-optional', 'com.spotify', 'hamcrest-optional').version('1.3.2')
28-
library('assertj-core', 'org.assertj', 'assertj-core').version('3.27.7')
29-
library('mockito-bom', 'org.mockito', 'mockito-bom').versionRef('mockito')
30-
library('mockito-core', 'org.mockito', 'mockito-core').withoutVersion()
31-
library('mockito-junit-jupiter', 'org.mockito', 'mockito-junit-jupiter').withoutVersion()
32-
library('awaitility', 'org.awaitility', 'awaitility').version('4.3.0')
33-
34-
bundle('junit', ['junit-jupiter'])
35-
bundle('hamcrest', ['hamcrest', 'hamcrest-optional'])
36-
bundle('mockito', ['mockito-core', 'mockito-junit-jupiter'])
13+
from(files('gradle/test-libs.versions.toml'))
3714
}
3815
}
3916
}

0 commit comments

Comments
 (0)