Skip to content

Commit 8c15b4f

Browse files
committed
Switch to TOML based version catalogs
1 parent 3ee5314 commit 8c15b4f

4 files changed

Lines changed: 50 additions & 28 deletions

File tree

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-FileCopyrightText: Copyright 2020-2025 Mark Rotteveel
1+
// SPDX-FileCopyrightText: Copyright 2020-2026 Mark Rotteveel
22
// SPDX-License-Identifier: LGPL-2.1-or-later
33
import org.apache.tools.ant.filters.*
44
import org.asciidoctor.gradle.jvm.AsciidoctorTask
@@ -13,10 +13,10 @@ import org.asciidoctor.gradle.jvm.AsciidoctorTask
1313

1414
plugins {
1515
id 'java-library'
16-
id 'nu.studer.credentials' version '3.0'
16+
alias(libs.plugins.credentials)
1717
id 'maven-publish'
1818
id 'signing'
19-
id 'org.asciidoctor.jvm.convert' version '4.0.5'
19+
alias(libs.plugins.asciidoctor.jvm.convert)
2020
}
2121

2222
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: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-FileCopyrightText: Copyright 2020-2025 Mark Rotteveel
1+
// SPDX-FileCopyrightText: Copyright 2020-2026 Mark Rotteveel
22
// SPDX-License-Identifier: LGPL-2.1-or-later
33
rootProject.name = 'jaybird'
44
include 'chacha64-plugin'
@@ -11,31 +11,8 @@ dependencyResolutionManagement {
1111
}
1212

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

0 commit comments

Comments
 (0)