Skip to content

Commit 05852b7

Browse files
authored
more cleanups to dependencies (#9354)
1 parent dbbe61c commit 05852b7

File tree

6 files changed

+44
-53
lines changed

6 files changed

+44
-53
lines changed

documentation/documentation.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,11 @@ dependencies {
181181
javadocClasspath jakartaLibs.jacc
182182
javadocClasspath jakartaLibs.jsonbApi
183183
javadocClasspath libs.ant
184-
javadocClasspath dbLibs.postgresql
184+
javadocClasspath jdbcLibs.postgresql
185185
javadocClasspath libs.jackson
186186
javadocClasspath gradleApi()
187187
javadocClasspath libs.jacksonXml
188-
javadocClasspath dbLibs.oracle
188+
javadocClasspath jdbcLibs.oracle
189189
}
190190

191191

@@ -303,7 +303,7 @@ def buildTutorialZipTask = tasks.register( 'buildTutorialZip', Zip ) { task ->
303303
version: project.version,
304304
slf4j: "2.0.7",
305305
junit: testLibs.versions.junit4.get(),
306-
h2: dbLibs.versions.h2.get()
306+
h2: jdbcLibs.versions.h2.get()
307307
)
308308
}
309309

gradle/java-module.gradle

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ dependencies {
8585

8686
compileOnly libs.loggingAnnotations
8787
// Used for compiling some Oracle specific JdbcTypes
88-
compileOnly dbLibs.oracle
88+
compileOnly jdbcLibs.oracle
8989

9090
// JUnit dependencies made up of:
9191
// * JUnit 5
@@ -98,51 +98,49 @@ dependencies {
9898
testImplementation testLibs.junit4Engine
9999
testImplementation testLibs.assertjCore
100100

101-
testImplementation testLibs.byteman
102-
103101
testRuntimeOnly testLibs.log4j2
104102
testRuntimeOnly libs.byteBuddy
105103

106104
//Databases
107-
testRuntimeOnly dbLibs.h2
108-
testRuntimeOnly dbLibs.derby
109-
testRuntimeOnly dbLibs.derbyTools
110-
testRuntimeOnly dbLibs.hsqldb
111-
testRuntimeOnly dbLibs.postgresql
112-
testRuntimeOnly dbLibs.mssql
113-
testRuntimeOnly dbLibs.informix
114-
testRuntimeOnly dbLibs.cockroachdb
115-
testRuntimeOnly dbLibs.sybase
105+
testRuntimeOnly jdbcLibs.h2
106+
testRuntimeOnly jdbcLibs.derby
107+
testRuntimeOnly jdbcLibs.derbyTools
108+
testRuntimeOnly jdbcLibs.hsqldb
109+
testRuntimeOnly jdbcLibs.postgresql
110+
testRuntimeOnly jdbcLibs.mssql
111+
testRuntimeOnly jdbcLibs.informix
112+
testRuntimeOnly jdbcLibs.cockroachdb
113+
testRuntimeOnly jdbcLibs.sybase
116114
testRuntimeOnly rootProject.fileTree(dir: 'drivers', include: '*.jar')
117115

118116
// Since both the DB2 driver and HANA have a package "net.jpountz" we have to add dependencies conditionally
119117
// This is due to the "no split-packages" requirement of Java 9+
120118

121119
if ( db.startsWith( 'db2' ) ) {
122-
testRuntimeOnly dbLibs.db2
120+
testRuntimeOnly jdbcLibs.db2
123121
}
124122
else if ( db.startsWith( 'hana' ) ) {
125-
testRuntimeOnly dbLibs.hana
123+
testRuntimeOnly jdbcLibs.hana
126124
}
127125
else if ( db.startsWith( 'mysql' ) || db.startsWith( 'tidb' ) ) {
128-
testRuntimeOnly dbLibs.mysql
126+
testRuntimeOnly jdbcLibs.mysql
129127
}
130128
else if ( db.startsWith( 'mariadb' ) ) {
131-
testRuntimeOnly dbLibs.mariadb
129+
testRuntimeOnly jdbcLibs.mariadb
132130
}
133131
else if ( db.startsWith( 'firebird' ) ) {
134-
testRuntimeOnly dbLibs.firebird
132+
testRuntimeOnly jdbcLibs.firebird
135133
}
136134
else if ( db.startsWith( 'oracle' ) ) {
137-
testRuntimeOnly dbLibs.oracle
138-
testRuntimeOnly dbLibs.oracleXml
139-
testRuntimeOnly dbLibs.oracleXmlParser
135+
testRuntimeOnly jdbcLibs.oracle
136+
testRuntimeOnly jdbcLibs.oracleXml
137+
testRuntimeOnly jdbcLibs.oracleXmlParser
140138
}
141139
else if ( db.startsWith( 'altibase' ) ) {
142-
testRuntimeOnly dbLibs.altibase
140+
testRuntimeOnly jdbcLibs.altibase
143141
}
144142
else if ( db.startsWith( 'informix' ) ) {
145-
testRuntimeOnly dbLibs.informix
143+
testRuntimeOnly jdbcLibs.informix
146144
}
147145

148146
annotationProcessor libs.loggingProcessor

hibernate-core/hibernate-core.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ dependencies {
4343
compileOnly jakartaLibs.jsonbApi
4444
compileOnly libs.jackson
4545
compileOnly libs.jacksonXml
46-
compileOnly dbLibs.postgresql
46+
compileOnly jdbcLibs.postgresql
4747

4848
// annotationProcessor project( ":annotation-descriptor-generator" )
4949
compileOnly project( ":annotation-descriptor-generator" )
@@ -52,10 +52,10 @@ dependencies {
5252
testImplementation project(':hibernate-ant')
5353
testImplementation project(':hibernate-scan-jandex')
5454

55-
testImplementation testLibs.shrinkwrapApi
55+
// testImplementation testLibs.shrinkwrapApi
5656
testImplementation testLibs.shrinkwrap
5757
testImplementation testLibs.shrinkwrapDescriptors
58-
testImplementation testLibs.shrinkwrapDescriptorsApi
58+
// testImplementation testLibs.shrinkwrapDescriptorsApi
5959
testImplementation jakartaLibs.cdi
6060
testImplementation jakartaLibs.jacc
6161
testImplementation jakartaLibs.validation
@@ -65,7 +65,7 @@ dependencies {
6565
transitive = true
6666
}
6767
testImplementation "joda-time:joda-time:2.3"
68-
testImplementation dbLibs.h2
68+
testImplementation jdbcLibs.h2
6969
testImplementation libs.hibernateModelsJandex
7070

7171
testRuntimeOnly libs.byteBuddy

hibernate-spatial/hibernate-spatial.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ dependencies {
1515
api project( ':hibernate-core' )
1616
api libs.geolatte
1717

18-
compileOnly dbLibs.postgresql
18+
compileOnly jdbcLibs.postgresql
1919

2020
testImplementation project( ':hibernate-testing' )
2121
testImplementation project( ':hibernate-ant' )
@@ -26,8 +26,8 @@ dependencies {
2626
testImplementation libs.validator
2727
testImplementation 'org.dom4j:dom4j:2.1.3@jar'
2828

29-
testImplementation dbLibs.postgresql
30-
testImplementation dbLibs.h2gis
29+
testImplementation jdbcLibs.postgresql
30+
testImplementation jdbcLibs.h2gis
3131

3232
testRuntimeOnly jakartaLibs.el
3333
testRuntimeOnly 'jaxen:jaxen:1.1'

hibernate-testing/hibernate-testing.gradle

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,24 @@ dependencies {
1717
api testLibs.junit5Api
1818
api testLibs.junit5Params
1919

20-
api 'org.hamcrest:hamcrest-all:1.3'
20+
api testLibs.hamcrest
2121
api testLibs.assertjCore
2222

2323
api testLibs.mockito
24-
// api testLibs.mockitoInline
2524

26-
api testLibs.byteman
27-
api testLibs.bytemanInstall
2825
api testLibs.bytemanBmunit
2926

30-
// api testLibs.xapool
3127
api( testLibs.jbossTxSpi ) {
32-
transitive=false;
28+
transitive=false
3329
}
3430
api( testLibs.jbossJta ) {
35-
transitive=false;
31+
transitive=false
3632
}
3733

38-
api 'javax.money:money-api:1.0.1'
39-
api 'org.javamoney:moneta:1.1'
34+
api 'javax.money:money-api:1.1'
35+
api ( 'org.javamoney.moneta:moneta-core:1.4.4' ) {
36+
transitive = false
37+
}
4038

4139
api testLibs.log4j2
4240

settings.gradle

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,15 @@ dependencyResolutionManagement {
9191
def viburVersion = version "vibur", "25.0"
9292
def ucpVersion = version "ucp", "23.6.0.24.10"
9393

94-
def jcacheVersion = version "jcache", "1.0.0"
94+
def jcacheVersion = version "jcache", "1.1.1"
9595
def ehcache3Version = version "ehcache3", "3.10.8"
9696

9797
def micrometerVersion = version "micrometer", "1.14.1"
9898

9999
def hibernateValidatorVersion = version "hibernateValidator", "8.0.1.Final"
100100

101+
def antVersion = version "ant", "1.10.15"
102+
101103
library( "antlr", "org.antlr", "antlr4" ).versionRef( antlrVersion )
102104
library( "antlrRuntime", "org.antlr", "antlr4-runtime" ).versionRef( antlrVersion)
103105

@@ -135,7 +137,7 @@ dependencyResolutionManagement {
135137

136138
library( "micrometer", "io.micrometer", "micrometer-core" ).versionRef( micrometerVersion )
137139

138-
library( "ant", "org.apache.ant", "ant" ).version( "1.8.2" )
140+
library( "ant", "org.apache.ant", "ant" ).versionRef( antVersion )
139141
}
140142
jakartaLibs {
141143
// `jakartaJpaVersion` comes from the local-build-plugins to allow for command-line overriding of the JPA version to use
@@ -179,17 +181,16 @@ dependencyResolutionManagement {
179181
def junit5LauncherVersion = version "junit5Launcher", "1.11.3"
180182

181183
def assertjVersion = version "assertj", "3.26.3"
184+
def hamcrestVersion = version "hamcrest", "3.0"
182185
def bytemanVersion = version "byteman", "4.0.23"
183186
def jbossJtaVersion = version "jbossJta", "7.1.0.Final"
184187
def jbossTxSpiVersion = version "jbossTxSpi", "8.0.0.Final"
185188
def log4jVersion = version "log4j", "2.24.2"
186189
def mockitoVersion = version "mockito", "5.14.2"
187-
//Compatible with JDK20
188190
def shrinkwrapVersion = version "shrinkwrap", "1.2.6"
189191
def shrinkwrapDescriptorsVersion = version "shrinkwrapDescriptors", "2.0.0"
190192
def weldVersion = version "weld", "5.1.3.Final"
191193
def wildFlyTxnClientVersion = version "wildFlyTxnClient", "2.0.0.Final"
192-
// def xapoolVersion = version "xapool", "1.5.0"
193194

194195
def jfrUnitVersion = version "jfrUnit", "1.0.0.Alpha2"
195196

@@ -202,22 +203,17 @@ dependencyResolutionManagement {
202203

203204
library( "assertjCore", "org.assertj", "assertj-core" ).versionRef( assertjVersion )
204205
library( "assertjApi", "org.assertj", "assertj-core-api" ).versionRef( assertjVersion )
206+
library( "hamcrest", "org.hamcrest", "hamcrest" ).versionRef( hamcrestVersion )
205207

206208
library( "log4j2", "org.apache.logging.log4j", "log4j-core" ).versionRef( log4jVersion )
207209

208210
library( "shrinkwrap", "org.jboss.shrinkwrap", "shrinkwrap-impl-base" ).versionRef( shrinkwrapVersion )
209-
library( "shrinkwrapApi", "org.jboss.shrinkwrap", "shrinkwrap-api" ).versionRef( shrinkwrapVersion )
210211
library( "shrinkwrapDescriptors", "org.jboss.shrinkwrap.descriptors", "shrinkwrap-descriptors-impl-javaee" ).versionRef( shrinkwrapDescriptorsVersion )
211-
library( "shrinkwrapDescriptorsApi", "org.jboss.shrinkwrap.descriptors", "shrinkwrap-descriptors-api-javaee" ).versionRef( shrinkwrapDescriptorsVersion )
212212

213-
library( "byteman", "org.jboss.byteman", "byteman" ).versionRef( bytemanVersion )
214-
library( "bytemanInstall", "org.jboss.byteman", "byteman-install" ).versionRef( bytemanVersion )
215213
library( "bytemanBmunit", "org.jboss.byteman", "byteman-bmunit" ).versionRef( bytemanVersion )
216214

217215
library( "mockito", "org.mockito", "mockito-core" ).versionRef( mockitoVersion )
218-
// library( "mockitoInline", "org.mockito", "mockito-inline" ).versionRef( mockitoVersion )
219216

220-
// library( "xapool", "com.experlog", "xapool" ).versionRef( xapoolVersion )
221217
library( "jbossJta", "org.jboss.narayana.jta", "narayana-jta" ).versionRef( jbossJtaVersion )
222218
library( "jbossTxSpi", "org.jboss", "jboss-transaction-spi" ).versionRef( jbossTxSpiVersion )
223219
library( "wildFlyTxnClient", "org.wildfly.transaction", "wildfly-transaction-client-jakarta" ).versionRef( wildFlyTxnClientVersion )
@@ -226,7 +222,7 @@ dependencyResolutionManagement {
226222

227223
library( "jfrUnit", "org.moditect.jfrunit", "jfrunit-core" ).versionRef( jfrUnitVersion )
228224
}
229-
dbLibs {
225+
jdbcLibs {
230226
def h2Version = version "h2", overrideableVersion( "gradle.libs.versions.h2", "2.3.232" )
231227

232228
def db2Version = version "db2", "11.5.9.0"
@@ -241,7 +237,6 @@ dependencyResolutionManagement {
241237
def mssqlVersion = version "mssql", "12.8.1.jre11"
242238
def mysqlVersion = version "mysql", "9.1.0"
243239
def oracleVersion = version "oracle", "23.4.0.24.05"
244-
def oracleLegacyVersion = version "oracleLegacy", "11.2.0.4"
245240
def pgsqlVersion = version "pgsql", "42.7.4"
246241
def sybaseVersion = version "sybase", "1.3.1"
247242
def tidbVersion = version "tidb", mysqlVersion

0 commit comments

Comments
 (0)