Fix hibernate-processor compilation on JDK 20+

This commit is contained in:
Christian Beikov 2024-04-25 16:18:34 +02:00 committed by Steve Ebersole
parent 0fa97f94b2
commit ecb8f6afc6
1 changed files with 22 additions and 4 deletions

View File

@ -9,10 +9,10 @@ description = 'Hibernate compile-time tooling'
apply from: rootProject.file( 'gradle/published-java-module.gradle' )
apply plugin: 'version-injection'
java {
sourceCompatibility = jdks.versions.baseline.get()
targetCompatibility = sourceCompatibility
}
//java {
// sourceCompatibility = jdks.versions.baseline.get()
// targetCompatibility = sourceCompatibility
//}
sourceSets {
quarkusOrmPanache {
@ -86,8 +86,14 @@ def quarkusOrmPanacheTestTask = tasks.register( 'quarkusOrmPanacheTest', Test )
testClassesDirs = sourceSets.quarkusOrmPanache.output.classesDirs
classpath = sourceSets.quarkusOrmPanache.runtimeClasspath
javaLauncher = tasks.test.javaLauncher
shouldRunAfter test
}
tasks.named( "compileQuarkusOrmPanacheJava", JavaCompile ) {
sourceCompatibility = tasks.compileTestJava.sourceCompatibility
targetCompatibility = tasks.compileTestJava.targetCompatibility
javaCompiler = tasks.compileTestJava.javaCompiler
}
def quarkusHrPanacheTestTask = tasks.register( 'quarkusHrPanacheTest', Test ) {
description = 'Runs the Quarkus HR Panache tests.'
@ -95,8 +101,14 @@ def quarkusHrPanacheTestTask = tasks.register( 'quarkusHrPanacheTest', Test ) {
testClassesDirs = sourceSets.quarkusHrPanache.output.classesDirs
classpath = sourceSets.quarkusHrPanache.runtimeClasspath
javaLauncher = tasks.test.javaLauncher
shouldRunAfter test
}
tasks.named( "compileQuarkusHrPanacheJava", JavaCompile ) {
sourceCompatibility = tasks.compileTestJava.sourceCompatibility
targetCompatibility = tasks.compileTestJava.targetCompatibility
javaCompiler = tasks.compileTestJava.javaCompiler
}
def jakartaDataTestTask = tasks.register( 'jakartaDataTest', Test ) {
description = 'Runs the Jakarta Data tests.'
@ -104,8 +116,14 @@ def jakartaDataTestTask = tasks.register( 'jakartaDataTest', Test ) {
testClassesDirs = sourceSets.jakartaData.output.classesDirs
classpath = sourceSets.jakartaData.runtimeClasspath
javaLauncher = tasks.test.javaLauncher
shouldRunAfter test
}
tasks.named( "compileJakartaDataJava", JavaCompile ) {
sourceCompatibility = tasks.compileTestJava.sourceCompatibility
targetCompatibility = tasks.compileTestJava.targetCompatibility
javaCompiler = tasks.compileTestJava.javaCompiler
}
check.dependsOn quarkusHrPanacheTestTask
check.dependsOn quarkusOrmPanacheTestTask