more cleanups to dependencies (#9354)

This commit is contained in:
Gavin King 2024-12-01 13:37:51 +01:00 committed by GitHub
parent dbbe61c5a0
commit 05852b706f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 44 additions and 53 deletions

View File

@ -181,11 +181,11 @@ dependencies {
javadocClasspath jakartaLibs.jacc javadocClasspath jakartaLibs.jacc
javadocClasspath jakartaLibs.jsonbApi javadocClasspath jakartaLibs.jsonbApi
javadocClasspath libs.ant javadocClasspath libs.ant
javadocClasspath dbLibs.postgresql javadocClasspath jdbcLibs.postgresql
javadocClasspath libs.jackson javadocClasspath libs.jackson
javadocClasspath gradleApi() javadocClasspath gradleApi()
javadocClasspath libs.jacksonXml javadocClasspath libs.jacksonXml
javadocClasspath dbLibs.oracle javadocClasspath jdbcLibs.oracle
} }
@ -303,7 +303,7 @@ def buildTutorialZipTask = tasks.register( 'buildTutorialZip', Zip ) { task ->
version: project.version, version: project.version,
slf4j: "2.0.7", slf4j: "2.0.7",
junit: testLibs.versions.junit4.get(), junit: testLibs.versions.junit4.get(),
h2: dbLibs.versions.h2.get() h2: jdbcLibs.versions.h2.get()
) )
} }

View File

@ -85,7 +85,7 @@ dependencies {
compileOnly libs.loggingAnnotations compileOnly libs.loggingAnnotations
// Used for compiling some Oracle specific JdbcTypes // Used for compiling some Oracle specific JdbcTypes
compileOnly dbLibs.oracle compileOnly jdbcLibs.oracle
// JUnit dependencies made up of: // JUnit dependencies made up of:
// * JUnit 5 // * JUnit 5
@ -98,51 +98,49 @@ dependencies {
testImplementation testLibs.junit4Engine testImplementation testLibs.junit4Engine
testImplementation testLibs.assertjCore testImplementation testLibs.assertjCore
testImplementation testLibs.byteman
testRuntimeOnly testLibs.log4j2 testRuntimeOnly testLibs.log4j2
testRuntimeOnly libs.byteBuddy testRuntimeOnly libs.byteBuddy
//Databases //Databases
testRuntimeOnly dbLibs.h2 testRuntimeOnly jdbcLibs.h2
testRuntimeOnly dbLibs.derby testRuntimeOnly jdbcLibs.derby
testRuntimeOnly dbLibs.derbyTools testRuntimeOnly jdbcLibs.derbyTools
testRuntimeOnly dbLibs.hsqldb testRuntimeOnly jdbcLibs.hsqldb
testRuntimeOnly dbLibs.postgresql testRuntimeOnly jdbcLibs.postgresql
testRuntimeOnly dbLibs.mssql testRuntimeOnly jdbcLibs.mssql
testRuntimeOnly dbLibs.informix testRuntimeOnly jdbcLibs.informix
testRuntimeOnly dbLibs.cockroachdb testRuntimeOnly jdbcLibs.cockroachdb
testRuntimeOnly dbLibs.sybase testRuntimeOnly jdbcLibs.sybase
testRuntimeOnly rootProject.fileTree(dir: 'drivers', include: '*.jar') testRuntimeOnly rootProject.fileTree(dir: 'drivers', include: '*.jar')
// Since both the DB2 driver and HANA have a package "net.jpountz" we have to add dependencies conditionally // Since both the DB2 driver and HANA have a package "net.jpountz" we have to add dependencies conditionally
// This is due to the "no split-packages" requirement of Java 9+ // This is due to the "no split-packages" requirement of Java 9+
if ( db.startsWith( 'db2' ) ) { if ( db.startsWith( 'db2' ) ) {
testRuntimeOnly dbLibs.db2 testRuntimeOnly jdbcLibs.db2
} }
else if ( db.startsWith( 'hana' ) ) { else if ( db.startsWith( 'hana' ) ) {
testRuntimeOnly dbLibs.hana testRuntimeOnly jdbcLibs.hana
} }
else if ( db.startsWith( 'mysql' ) || db.startsWith( 'tidb' ) ) { else if ( db.startsWith( 'mysql' ) || db.startsWith( 'tidb' ) ) {
testRuntimeOnly dbLibs.mysql testRuntimeOnly jdbcLibs.mysql
} }
else if ( db.startsWith( 'mariadb' ) ) { else if ( db.startsWith( 'mariadb' ) ) {
testRuntimeOnly dbLibs.mariadb testRuntimeOnly jdbcLibs.mariadb
} }
else if ( db.startsWith( 'firebird' ) ) { else if ( db.startsWith( 'firebird' ) ) {
testRuntimeOnly dbLibs.firebird testRuntimeOnly jdbcLibs.firebird
} }
else if ( db.startsWith( 'oracle' ) ) { else if ( db.startsWith( 'oracle' ) ) {
testRuntimeOnly dbLibs.oracle testRuntimeOnly jdbcLibs.oracle
testRuntimeOnly dbLibs.oracleXml testRuntimeOnly jdbcLibs.oracleXml
testRuntimeOnly dbLibs.oracleXmlParser testRuntimeOnly jdbcLibs.oracleXmlParser
} }
else if ( db.startsWith( 'altibase' ) ) { else if ( db.startsWith( 'altibase' ) ) {
testRuntimeOnly dbLibs.altibase testRuntimeOnly jdbcLibs.altibase
} }
else if ( db.startsWith( 'informix' ) ) { else if ( db.startsWith( 'informix' ) ) {
testRuntimeOnly dbLibs.informix testRuntimeOnly jdbcLibs.informix
} }
annotationProcessor libs.loggingProcessor annotationProcessor libs.loggingProcessor

View File

@ -43,7 +43,7 @@ dependencies {
compileOnly jakartaLibs.jsonbApi compileOnly jakartaLibs.jsonbApi
compileOnly libs.jackson compileOnly libs.jackson
compileOnly libs.jacksonXml compileOnly libs.jacksonXml
compileOnly dbLibs.postgresql compileOnly jdbcLibs.postgresql
// annotationProcessor project( ":annotation-descriptor-generator" ) // annotationProcessor project( ":annotation-descriptor-generator" )
compileOnly project( ":annotation-descriptor-generator" ) compileOnly project( ":annotation-descriptor-generator" )
@ -52,10 +52,10 @@ dependencies {
testImplementation project(':hibernate-ant') testImplementation project(':hibernate-ant')
testImplementation project(':hibernate-scan-jandex') testImplementation project(':hibernate-scan-jandex')
testImplementation testLibs.shrinkwrapApi // testImplementation testLibs.shrinkwrapApi
testImplementation testLibs.shrinkwrap testImplementation testLibs.shrinkwrap
testImplementation testLibs.shrinkwrapDescriptors testImplementation testLibs.shrinkwrapDescriptors
testImplementation testLibs.shrinkwrapDescriptorsApi // testImplementation testLibs.shrinkwrapDescriptorsApi
testImplementation jakartaLibs.cdi testImplementation jakartaLibs.cdi
testImplementation jakartaLibs.jacc testImplementation jakartaLibs.jacc
testImplementation jakartaLibs.validation testImplementation jakartaLibs.validation
@ -65,7 +65,7 @@ dependencies {
transitive = true transitive = true
} }
testImplementation "joda-time:joda-time:2.3" testImplementation "joda-time:joda-time:2.3"
testImplementation dbLibs.h2 testImplementation jdbcLibs.h2
testImplementation libs.hibernateModelsJandex testImplementation libs.hibernateModelsJandex
testRuntimeOnly libs.byteBuddy testRuntimeOnly libs.byteBuddy

View File

@ -15,7 +15,7 @@ dependencies {
api project( ':hibernate-core' ) api project( ':hibernate-core' )
api libs.geolatte api libs.geolatte
compileOnly dbLibs.postgresql compileOnly jdbcLibs.postgresql
testImplementation project( ':hibernate-testing' ) testImplementation project( ':hibernate-testing' )
testImplementation project( ':hibernate-ant' ) testImplementation project( ':hibernate-ant' )
@ -26,8 +26,8 @@ dependencies {
testImplementation libs.validator testImplementation libs.validator
testImplementation 'org.dom4j:dom4j:2.1.3@jar' testImplementation 'org.dom4j:dom4j:2.1.3@jar'
testImplementation dbLibs.postgresql testImplementation jdbcLibs.postgresql
testImplementation dbLibs.h2gis testImplementation jdbcLibs.h2gis
testRuntimeOnly jakartaLibs.el testRuntimeOnly jakartaLibs.el
testRuntimeOnly 'jaxen:jaxen:1.1' testRuntimeOnly 'jaxen:jaxen:1.1'

View File

@ -17,26 +17,24 @@ dependencies {
api testLibs.junit5Api api testLibs.junit5Api
api testLibs.junit5Params api testLibs.junit5Params
api 'org.hamcrest:hamcrest-all:1.3' api testLibs.hamcrest
api testLibs.assertjCore api testLibs.assertjCore
api testLibs.mockito api testLibs.mockito
// api testLibs.mockitoInline
api testLibs.byteman
api testLibs.bytemanInstall
api testLibs.bytemanBmunit api testLibs.bytemanBmunit
// api testLibs.xapool
api( testLibs.jbossTxSpi ) { api( testLibs.jbossTxSpi ) {
transitive=false; transitive=false
} }
api( testLibs.jbossJta ) { api( testLibs.jbossJta ) {
transitive=false; transitive=false
} }
api 'javax.money:money-api:1.0.1' api 'javax.money:money-api:1.1'
api 'org.javamoney:moneta:1.1' api ( 'org.javamoney.moneta:moneta-core:1.4.4' ) {
transitive = false
}
api testLibs.log4j2 api testLibs.log4j2

View File

@ -91,13 +91,15 @@ dependencyResolutionManagement {
def viburVersion = version "vibur", "25.0" def viburVersion = version "vibur", "25.0"
def ucpVersion = version "ucp", "23.6.0.24.10" def ucpVersion = version "ucp", "23.6.0.24.10"
def jcacheVersion = version "jcache", "1.0.0" def jcacheVersion = version "jcache", "1.1.1"
def ehcache3Version = version "ehcache3", "3.10.8" def ehcache3Version = version "ehcache3", "3.10.8"
def micrometerVersion = version "micrometer", "1.14.1" def micrometerVersion = version "micrometer", "1.14.1"
def hibernateValidatorVersion = version "hibernateValidator", "8.0.1.Final" def hibernateValidatorVersion = version "hibernateValidator", "8.0.1.Final"
def antVersion = version "ant", "1.10.15"
library( "antlr", "org.antlr", "antlr4" ).versionRef( antlrVersion ) library( "antlr", "org.antlr", "antlr4" ).versionRef( antlrVersion )
library( "antlrRuntime", "org.antlr", "antlr4-runtime" ).versionRef( antlrVersion) library( "antlrRuntime", "org.antlr", "antlr4-runtime" ).versionRef( antlrVersion)
@ -135,7 +137,7 @@ dependencyResolutionManagement {
library( "micrometer", "io.micrometer", "micrometer-core" ).versionRef( micrometerVersion ) library( "micrometer", "io.micrometer", "micrometer-core" ).versionRef( micrometerVersion )
library( "ant", "org.apache.ant", "ant" ).version( "1.8.2" ) library( "ant", "org.apache.ant", "ant" ).versionRef( antVersion )
} }
jakartaLibs { jakartaLibs {
// `jakartaJpaVersion` comes from the local-build-plugins to allow for command-line overriding of the JPA version to use // `jakartaJpaVersion` comes from the local-build-plugins to allow for command-line overriding of the JPA version to use
@ -179,17 +181,16 @@ dependencyResolutionManagement {
def junit5LauncherVersion = version "junit5Launcher", "1.11.3" def junit5LauncherVersion = version "junit5Launcher", "1.11.3"
def assertjVersion = version "assertj", "3.26.3" def assertjVersion = version "assertj", "3.26.3"
def hamcrestVersion = version "hamcrest", "3.0"
def bytemanVersion = version "byteman", "4.0.23" def bytemanVersion = version "byteman", "4.0.23"
def jbossJtaVersion = version "jbossJta", "7.1.0.Final" def jbossJtaVersion = version "jbossJta", "7.1.0.Final"
def jbossTxSpiVersion = version "jbossTxSpi", "8.0.0.Final" def jbossTxSpiVersion = version "jbossTxSpi", "8.0.0.Final"
def log4jVersion = version "log4j", "2.24.2" def log4jVersion = version "log4j", "2.24.2"
def mockitoVersion = version "mockito", "5.14.2" def mockitoVersion = version "mockito", "5.14.2"
//Compatible with JDK20
def shrinkwrapVersion = version "shrinkwrap", "1.2.6" def shrinkwrapVersion = version "shrinkwrap", "1.2.6"
def shrinkwrapDescriptorsVersion = version "shrinkwrapDescriptors", "2.0.0" def shrinkwrapDescriptorsVersion = version "shrinkwrapDescriptors", "2.0.0"
def weldVersion = version "weld", "5.1.3.Final" def weldVersion = version "weld", "5.1.3.Final"
def wildFlyTxnClientVersion = version "wildFlyTxnClient", "2.0.0.Final" def wildFlyTxnClientVersion = version "wildFlyTxnClient", "2.0.0.Final"
// def xapoolVersion = version "xapool", "1.5.0"
def jfrUnitVersion = version "jfrUnit", "1.0.0.Alpha2" def jfrUnitVersion = version "jfrUnit", "1.0.0.Alpha2"
@ -202,22 +203,17 @@ dependencyResolutionManagement {
library( "assertjCore", "org.assertj", "assertj-core" ).versionRef( assertjVersion ) library( "assertjCore", "org.assertj", "assertj-core" ).versionRef( assertjVersion )
library( "assertjApi", "org.assertj", "assertj-core-api" ).versionRef( assertjVersion ) library( "assertjApi", "org.assertj", "assertj-core-api" ).versionRef( assertjVersion )
library( "hamcrest", "org.hamcrest", "hamcrest" ).versionRef( hamcrestVersion )
library( "log4j2", "org.apache.logging.log4j", "log4j-core" ).versionRef( log4jVersion ) library( "log4j2", "org.apache.logging.log4j", "log4j-core" ).versionRef( log4jVersion )
library( "shrinkwrap", "org.jboss.shrinkwrap", "shrinkwrap-impl-base" ).versionRef( shrinkwrapVersion ) library( "shrinkwrap", "org.jboss.shrinkwrap", "shrinkwrap-impl-base" ).versionRef( shrinkwrapVersion )
library( "shrinkwrapApi", "org.jboss.shrinkwrap", "shrinkwrap-api" ).versionRef( shrinkwrapVersion )
library( "shrinkwrapDescriptors", "org.jboss.shrinkwrap.descriptors", "shrinkwrap-descriptors-impl-javaee" ).versionRef( shrinkwrapDescriptorsVersion ) library( "shrinkwrapDescriptors", "org.jboss.shrinkwrap.descriptors", "shrinkwrap-descriptors-impl-javaee" ).versionRef( shrinkwrapDescriptorsVersion )
library( "shrinkwrapDescriptorsApi", "org.jboss.shrinkwrap.descriptors", "shrinkwrap-descriptors-api-javaee" ).versionRef( shrinkwrapDescriptorsVersion )
library( "byteman", "org.jboss.byteman", "byteman" ).versionRef( bytemanVersion )
library( "bytemanInstall", "org.jboss.byteman", "byteman-install" ).versionRef( bytemanVersion )
library( "bytemanBmunit", "org.jboss.byteman", "byteman-bmunit" ).versionRef( bytemanVersion ) library( "bytemanBmunit", "org.jboss.byteman", "byteman-bmunit" ).versionRef( bytemanVersion )
library( "mockito", "org.mockito", "mockito-core" ).versionRef( mockitoVersion ) library( "mockito", "org.mockito", "mockito-core" ).versionRef( mockitoVersion )
// library( "mockitoInline", "org.mockito", "mockito-inline" ).versionRef( mockitoVersion )
// library( "xapool", "com.experlog", "xapool" ).versionRef( xapoolVersion )
library( "jbossJta", "org.jboss.narayana.jta", "narayana-jta" ).versionRef( jbossJtaVersion ) library( "jbossJta", "org.jboss.narayana.jta", "narayana-jta" ).versionRef( jbossJtaVersion )
library( "jbossTxSpi", "org.jboss", "jboss-transaction-spi" ).versionRef( jbossTxSpiVersion ) library( "jbossTxSpi", "org.jboss", "jboss-transaction-spi" ).versionRef( jbossTxSpiVersion )
library( "wildFlyTxnClient", "org.wildfly.transaction", "wildfly-transaction-client-jakarta" ).versionRef( wildFlyTxnClientVersion ) library( "wildFlyTxnClient", "org.wildfly.transaction", "wildfly-transaction-client-jakarta" ).versionRef( wildFlyTxnClientVersion )
@ -226,7 +222,7 @@ dependencyResolutionManagement {
library( "jfrUnit", "org.moditect.jfrunit", "jfrunit-core" ).versionRef( jfrUnitVersion ) library( "jfrUnit", "org.moditect.jfrunit", "jfrunit-core" ).versionRef( jfrUnitVersion )
} }
dbLibs { jdbcLibs {
def h2Version = version "h2", overrideableVersion( "gradle.libs.versions.h2", "2.3.232" ) def h2Version = version "h2", overrideableVersion( "gradle.libs.versions.h2", "2.3.232" )
def db2Version = version "db2", "11.5.9.0" def db2Version = version "db2", "11.5.9.0"
@ -241,7 +237,6 @@ dependencyResolutionManagement {
def mssqlVersion = version "mssql", "12.8.1.jre11" def mssqlVersion = version "mssql", "12.8.1.jre11"
def mysqlVersion = version "mysql", "9.1.0" def mysqlVersion = version "mysql", "9.1.0"
def oracleVersion = version "oracle", "23.4.0.24.05" def oracleVersion = version "oracle", "23.4.0.24.05"
def oracleLegacyVersion = version "oracleLegacy", "11.2.0.4"
def pgsqlVersion = version "pgsql", "42.7.4" def pgsqlVersion = version "pgsql", "42.7.4"
def sybaseVersion = version "sybase", "1.3.1" def sybaseVersion = version "sybase", "1.3.1"
def tidbVersion = version "tidb", mysqlVersion def tidbVersion = version "tidb", mysqlVersion