Skip to content

Commit ebdd859

Browse files
committed
Use toml format for the version catalog
1 parent b9622ae commit ebdd859

File tree

6 files changed

+93
-87
lines changed

6 files changed

+93
-87
lines changed

build.gradle

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
plugins {
22
id "release-process"
3-
id 'com.diffplug.spotless' version '6.25.0' apply false
4-
5-
id "com.dorongold.task-tree" version "4.0.0"
3+
alias(libs.plugins.spotless) apply false
4+
alias(libs.plugins.taskTree)
65
}

buildSrc/src/main/groovy/java-module.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ plugins {
44
}
55

66
dependencies {
7-
implementation libs.logging
7+
implementation libs.loggingCore
88

99
compileOnly libs.loggingAnnotations
1010

11+
annotationProcessor libs.loggingCore
1112
annotationProcessor libs.loggingProcessor
12-
annotationProcessor libs.logging
1313
annotationProcessor libs.loggingAnnotations
1414
}
1515

@@ -19,8 +19,8 @@ dependencies {
1919
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2020

2121
java {
22-
sourceCompatibility = jdks.versions.baseline.get() as int
23-
targetCompatibility = jdks.versions.baseline.get() as int
22+
sourceCompatibility = libs.versions.jdks.baseline.get() as int
23+
targetCompatibility = libs.versions.jdks.baseline.get() as int
2424
}
2525

2626
// create a single "compile" task

buildSrc/src/main/groovy/testing.gradle

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@ plugins {
99
}
1010

1111
dependencies {
12-
testImplementation jakartaLibs.jpa
13-
testImplementation testLibs.junit5Api
14-
testImplementation testLibs.assertjCore
15-
testImplementation testLibs.junit5Params
12+
testImplementation libs.jakarta.jpa
13+
testImplementation libs.test.assertjCore
1614

17-
testImplementation testLibs.junit5Engine
18-
testImplementation testLibs.log4j
15+
testImplementation libs.test.junitJupiterApi
16+
testImplementation libs.test.junitJupiterEngine
17+
testImplementation libs.test.junitJupiterParams
18+
19+
testImplementation libs.test.log4jCore
1920
}
2021

2122
test {
@@ -42,4 +43,4 @@ jacocoTestReport {
4243

4344
tasks.named( "check" ) {
4445
dependsOn jacocoReportTask
45-
}
46+
}

gradle/libs.versions.toml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
[versions]
2+
# libs
3+
byteBuddy = "1.14.7"
4+
classmate = "1.5.1"
5+
jackson = "2.14.1"
6+
jandex = "3.3.0"
7+
jbossLogging = "3.5.0.Final"
8+
jbossLoggingTool = "2.2.1.Final"
9+
10+
# jdks
11+
jdks-baseline = "17"
12+
13+
# jakartaLibs
14+
jpa = "3.2.0-B02"
15+
inject = "2.0.1"
16+
jaxbApi = "4.0.0"
17+
jaxbRuntime = "4.0.2"
18+
jsonbApi = "3.0.0"
19+
jsonbRuntime = "3.0.2"
20+
21+
# testLibs
22+
assertj = "3.22.0"
23+
h2 = "2.2.224"
24+
junit5 = "5.11.0"
25+
log4j = "2.17.1"
26+
27+
# plugins
28+
spotless="6.25.0"
29+
develocity="3.17.4"
30+
checkerframework="0.6.34"
31+
taskTree="4.0.0"
32+
33+
[libraries]
34+
# libs
35+
byteBuddy = { group = "net.bytebuddy", name = "byte-buddy", version.ref = "byteBuddy" }
36+
byteBuddyAgent = { group = "net.bytebuddy", name = "byte-buddy-agent", version.ref = "byteBuddy" }
37+
classmate = { group = "com.fasterxml", name = "classmate", version.ref = "classmate" }
38+
jacksonDatabind = { group = "com.fasterxml.jackson.core", name = "jackson-databind", version.ref = "jackson" }
39+
jacksonDataformatXml = { group = "com.fasterxml.jackson.dataformat", name = "jackson-dataformat-xml", version.ref = "jackson" }
40+
jacksonDatatypeJsr310 = { group = "com.fasterxml.jackson.datatype", name = "jackson-datatype-jsr310", version.ref = "jackson" }
41+
jandex = { group = "io.smallrye", name = "jandex", version.ref = "jandex" }
42+
loggingCore = { group = "org.jboss.logging", name = "jboss-logging", version.ref = "jbossLogging" }
43+
loggingAnnotations = { group = "org.jboss.logging", name = "jboss-logging-annotations", version.ref = "jbossLoggingTool" }
44+
loggingProcessor = { group = "org.jboss.logging", name = "jboss-logging-processor", version.ref = "jbossLoggingTool" }
45+
46+
# jakartaLibs
47+
jakarta-jpa = { group = "jakarta.persistence", name = "jakarta.persistence-api", version.ref = "jpa" }
48+
jakarta-inject = { group = "jakarta.inject", name = "jakarta.inject-api", version.ref = "inject" }
49+
jakarta-jaxbApi = { group = "jakarta.xml.bind", name = "jakarta.xml.bind-api", version.ref = "jaxbApi" }
50+
jakarta-jaxbRuntime = { group = "org.glassfish.jaxb", name = "jaxb-runtime", version.ref = "jaxbRuntime" }
51+
jakarta-xjc = { group = "org.glassfish.jaxb", name = "jaxb-xjc", version.ref = "jaxbRuntime" }
52+
jakarta-jsonbApi = { group = "jakarta.json.bind", name = "jakarta.json.bind-api", version.ref = "jsonbApi" }
53+
jakarta-jsonb = { group = "org.eclipse", name = "yasson", version.ref = "jsonbRuntime" }
54+
55+
# testLibs
56+
test-assertjCore = { group = "org.assertj", name = "assertj-core", version.ref = "assertj" }
57+
test-h2 = { group = "com.h2database", name = "h2", version.ref = "h2" }
58+
test-junitJupiterApi = { group = "org.junit.jupiter", name = "junit-jupiter-api", version.ref = "junit5" }
59+
test-junitJupiterEngine = { group = "org.junit.jupiter", name = "junit-jupiter-engine", version.ref = "junit5" }
60+
test-junitJupiterParams = { group = "org.junit.jupiter", name = "junit-jupiter-params", version.ref = "junit5" }
61+
test-log4jCore = { group = "org.apache.logging.log4j", name = "log4j-core", version.ref = "log4j" }
62+
63+
[plugins]
64+
spotless = { id = "com.diffplug.spotless", version.ref = "spotless" }
65+
develocity = { id = "com.gradle.develocity", version.ref = "develocity" }
66+
checkerframework = { id = "org.checkerframework", version.ref = "checkerframework" }
67+
taskTree = { id = "com.dorongold.task-tree", version.ref = "taskTree" }

hibernate-models-testing/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ description = "Test fixtures for modules performing tests"
66

77
dependencies {
88
implementation project( ":hibernate-models" )
9-
implementation jakartaLibs.jpa
10-
}
9+
implementation libs.jakarta.jpa
10+
}

settings.gradle

Lines changed: 10 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -37,81 +37,21 @@ dependencyResolutionManagement {
3737
url "https://jakarta.oss.sonatype.org/content/repositories/snapshots/"
3838
}
3939
}
40+
}
4041

41-
versionCatalogs {
42-
jdks {
43-
version "baseline", "17"
44-
}
45-
libs {
46-
def byteBuddyVersion = version "byteBuddy", "1.14.7"
47-
library( "byteBuddy", "net.bytebuddy", "byte-buddy" ).versionRef( byteBuddyVersion )
48-
library( "byteBuddyAgent", "net.bytebuddy", "byte-buddy-agent" ).versionRef( byteBuddyVersion )
49-
50-
def classmateVersion = version "classmate", "1.5.1"
51-
library( "classmate", "com.fasterxml", "classmate" ).versionRef( classmateVersion )
52-
53-
def jacksonVersion = version "jackson", "2.14.1"
54-
library( "jackson", "com.fasterxml.jackson.core", "jackson-databind" ).versionRef( jacksonVersion )
55-
library( "jacksonXml", "com.fasterxml.jackson.dataformat", "jackson-dataformat-xml" ).versionRef( jacksonVersion )
56-
library( "jacksonJsr310", "com.fasterxml.jackson.datatype", "jackson-datatype-jsr310" ).versionRef( jacksonVersion )
57-
58-
def jandexVersion = version "jandex", "3.3.0"
59-
library( "jandex", "io.smallrye", "jandex" ).versionRef( jandexVersion )
60-
61-
def jbossLoggingVersion = version "jbossLogging", "3.5.0.Final"
62-
library( "logging", "org.jboss.logging", "jboss-logging" ).versionRef( jbossLoggingVersion )
63-
64-
def jbossLoggingToolVersion = version "jbossLoggingTool", "2.2.1.Final"
65-
library( "loggingAnnotations", "org.jboss.logging", "jboss-logging-annotations" ).versionRef( jbossLoggingToolVersion )
66-
library( "loggingProcessor", "org.jboss.logging", "jboss-logging-processor" ).versionRef( jbossLoggingToolVersion )
67-
}
68-
jakartaLibs {
69-
def jpaVersion = version "jpa", "3.2.0-B02"
70-
library( "jpa", "jakarta.persistence", "jakarta.persistence-api" ).versionRef( jpaVersion )
71-
72-
def injectVersion = version "inject", "2.0.1"
73-
def jaxbApiVersion = version "jaxbApi", "4.0.0"
74-
def jaxbRuntimeVersion = version "jaxbRuntime", "4.0.2"
75-
library( "inject", "jakarta.inject", "jakarta.inject-api" ).versionRef( injectVersion )
76-
library( "jaxbApi", "jakarta.xml.bind", "jakarta.xml.bind-api" ).versionRef( jaxbApiVersion )
77-
library( "jaxb", "org.glassfish.jaxb", "jaxb-runtime" ).versionRef( jaxbRuntimeVersion )
78-
library( "xjc", "org.glassfish.jaxb", "jaxb-xjc" ).versionRef( jaxbRuntimeVersion )
42+
develocity {
43+
server = 'https://develocity.commonhaus.dev'
7944

80-
def jsonbApiVersion = version "jsonbApi", "3.0.0"
81-
def jsonbRuntimeVersion = version "jsonbRuntime", "3.0.2"
82-
library( "jsonbApi", "jakarta.json.bind", "jakarta.json.bind-api" ).versionRef( jsonbApiVersion )
83-
library( "jsonb", "org.eclipse", "yasson" ).versionRef( jsonbRuntimeVersion )
45+
buildScan {
46+
capture {
47+
fileFingerprints = true
8448
}
85-
testLibs {
86-
def assertjVersion = version "assertj", "3.22.0"
87-
library( "assertjCore", "org.assertj", "assertj-core" ).versionRef( assertjVersion )
49+
publishing.onlyIf { it.authenticated }
8850

89-
def h2Version = version "h2", "2.2.224"
90-
library( "h2", "com.h2database", "h2" ).versionRef( h2Version )
91-
92-
def junit5Version = version "junit5", "5.11.0"
93-
library( "junit5Api", "org.junit.jupiter", "junit-jupiter-api" ).versionRef( junit5Version )
94-
library( "junit5Engine", "org.junit.jupiter", "junit-jupiter-engine" ).versionRef( junit5Version )
95-
library( "junit5Params", "org.junit.jupiter", "junit-jupiter-params" ).versionRef( junit5Version )
96-
97-
def log4jVersion = version "log4j", "2.17.1"
98-
library( "log4j", "org.apache.logging.log4j", "log4j-core" ).versionRef( log4jVersion )
51+
obfuscation {
52+
// Don't share ip addresses
53+
ipAddresses { addresses -> addresses.collect { address -> "0.0.0.0" } }
9954
}
100-
}
101-
102-
develocity {
103-
server = 'https://develocity.commonhaus.dev'
104-
105-
buildScan {
106-
capture {
107-
fileFingerprints = true
108-
}
109-
publishing.onlyIf { it.authenticated }
110-
111-
obfuscation {
112-
// Don't share ip addresses
113-
ipAddresses { addresses -> addresses.collect { address -> "0.0.0.0" } }
114-
}
11555

11656
// uploadInBackground = !settings.ext.isCiEnvironment
11757
//
@@ -122,7 +62,6 @@ dependencyResolutionManagement {
12262
// if ( settings.extensions.findByName( 'ci.node' ) ) {
12363
// tag settings.extensions.findByName( 'ci.node' )
12464
// }
125-
}
12665
}
12766
}
12867

0 commit comments

Comments
 (0)