HHH-14640 : Fix gradle errors

This commit is contained in:
Andrea Boriero 2021-05-26 14:24:51 +02:00 committed by gbadner
parent 9e454a3819
commit cc6fe84f30
7 changed files with 10 additions and 15 deletions

View File

@ -37,6 +37,7 @@ File versionFile = file( "${rootProject.projectDir}/gradle/version.properties" )
ext { ext {
ormVersionFile = versionFile ormVersionFile = versionFile
baselineJavaVersion = '1.8'
ormVersion = HibernateVersion.fromFile( versionFile, project ) ormVersion = HibernateVersion.fromFile( versionFile, project )
// Override during releases // Override during releases
if ( project.hasProperty( 'releaseVersion' ) ) { if ( project.hasProperty( 'releaseVersion' ) ) {

View File

@ -40,7 +40,7 @@ dependencies {
compile( libraries.jpa ) compile( libraries.jpa )
compile( project( ':hibernate-core' ) ) compile( project( ':hibernate-core' ) )
compile( project( ':hibernate-jpamodelgen' ) ) annotationProcessor( project( ':hibernate-jpamodelgen' ) )
testCompile( 'org.apache.commons:commons-lang3:3.4' ) testCompile( 'org.apache.commons:commons-lang3:3.4' )

View File

@ -217,13 +217,12 @@ test {
// Enable the experimental features of ByteBuddy with JDK 15+ // Enable the experimental features of ByteBuddy with JDK 15+
test { test {
if ( Integer.valueOf( gradle.ext.testedJavaVersionAsEnum.getMajorVersion() ) >= 15 ) { if ( JavaVersion.current().isJava11Compatible() ) {
if ( JavaVersion.current().isJava11Compatible() ) { int majorJVMVersionInt = Integer.valueOf( JavaVersion.current().toString() );
int majorJVMVersionInt = Integer.valueOf(JavaVersion.current().toString()); //Set the -Dnet.bytebuddy.experimental=true property only when we need it:
//Set the -Dnet.bytebuddy.experimental=true property only when we need it: if ( majorJVMVersionInt >= 12 ) {
if (majorJVMVersionInt >= 12) { systemProperty 'net.bytebuddy.experimental', true
systemProperty 'net.bytebuddy.experimental', true }
}
} }
} }

View File

@ -93,7 +93,6 @@ dependencies {
testCompile( libraries.mockito ) testCompile( libraries.mockito )
testCompile( libraries.mockito_inline ) testCompile( libraries.mockito_inline )
testCompile( libraries.jodaTime ) testCompile( libraries.jodaTime )
testCompile( libraries.assertj )
testCompile( libraries.cdi ) { testCompile( libraries.cdi ) {
// we need to force it to make sure we influence the one coming from arquillian // we need to force it to make sure we influence the one coming from arquillian
@ -114,8 +113,6 @@ dependencies {
testRuntime( libraries.javassist ) testRuntime( libraries.javassist )
testRuntime( libraries.byteBuddy ) testRuntime( libraries.byteBuddy )
testRuntime( libraries.weld ) testRuntime( libraries.weld )
testRuntime( libraries.atomikos )
testRuntime( libraries.atomikos_jta )
testRuntime(libraries.wildfly_transaction_client) testRuntime(libraries.wildfly_transaction_client)
testAnnotationProcessor( project( ':hibernate-jpamodelgen' ) ) testAnnotationProcessor( project( ':hibernate-jpamodelgen' ) )

View File

@ -17,7 +17,7 @@ dependencies {
} }
provided( libraries.ant ) provided( libraries.ant )
provided( project( ':hibernate-jpamodelgen' ) ) annotationProcessor( project( ':hibernate-jpamodelgen' ) )
testCompile( project( ':hibernate-testing' ) ) testCompile( project( ':hibernate-testing' ) )
testCompile( project( path: ':hibernate-core', configuration: 'tests' ) ) testCompile( project( path: ':hibernate-core', configuration: 'tests' ) )

View File

@ -12,7 +12,6 @@ plugins {
apply from: rootProject.file( 'gradle/base-information.gradle' )
apply plugin: 'java' apply plugin: 'java'
apply from: rootProject.file( 'gradle/libraries.gradle' ) apply from: rootProject.file( 'gradle/libraries.gradle' )
@ -30,7 +29,6 @@ ext {
description = "Feature Pack of Hibernate ORM modules for WildFly ${project.wildFlyMajorVersion}" description = "Feature Pack of Hibernate ORM modules for WildFly ${project.wildFlyMajorVersion}"
apply plugin: 'maven-publish' apply plugin: 'maven-publish'
apply plugin: 'org.hibernate.build.maven-repo-auth'
apply from: rootProject.file( 'gradle/publishing-repos.gradle' ) apply from: rootProject.file( 'gradle/publishing-repos.gradle' )
apply from: rootProject.file( 'gradle/publishing-pom.gradle' ) apply from: rootProject.file( 'gradle/publishing-pom.gradle' )
@ -132,7 +130,7 @@ publishing {
} }
task ciBuild( dependsOn: [clean, test, publish] ) task ciBuild( dependsOn: [clean, test, publish] )
task release( dependsOn: [clean, test, bintrayUpload] ) task release( dependsOn: [clean, test, publishToSonatype] )
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// tasks related to in-container (Arquillian + WF) testing // tasks related to in-container (Arquillian + WF) testing