/* * Hibernate, Relational Persistence for Idiomatic Java * * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or . */ 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 } sourceSets { quarkusOrmPanache { java { srcDirs = ['src/quarkusOrmPanache/java'] } resources { srcDirs sourceSets.main.resources } compileClasspath += sourceSets.main.output + sourceSets.test.output runtimeClasspath += sourceSets.main.output + sourceSets.test.output } quarkusHrPanache { java { srcDirs = ['src/quarkusHrPanache/java'] } resources { srcDirs sourceSets.main.resources } compileClasspath += sourceSets.main.output + sourceSets.test.output runtimeClasspath += sourceSets.main.output + sourceSets.test.output } jakartaData { java { srcDirs = ['src/jakartaData/java'] } resources { srcDirs sourceSets.main.resources } compileClasspath += sourceSets.main.output + sourceSets.test.output runtimeClasspath += sourceSets.main.output + sourceSets.test.output } } dependencies { // api - ewww... but Maven needs them this way api project( ':hibernate-core' ) api libs.hcann api libs.jandex api jakartaLibs.jaxbApi api jakartaLibs.jaxb api jakartaLibs.validation api jakartaLibs.annotation api libs.antlrRuntime api libs.byteBuddy api libs.logging quarkusOrmPanacheImplementation "io.quarkus:quarkus-hibernate-orm-panache:3.6.2" quarkusHrPanacheImplementation "io.quarkus:quarkus-hibernate-reactive-panache:3.6.2" jakartaDataImplementation "jakarta.data:jakarta.data-api:1.0.0" jakartaDataImplementation "org.hibernate.reactive:hibernate-reactive-core:2.2.2.Final" jakartaDataImplementation "io.quarkus:quarkus-hibernate-orm-panache:3.6.2" } // The source set gets a custom configuration which extends the normal test implementation config configurations { quarkusOrmPanacheImplementation.extendsFrom(testImplementation) quarkusOrmPanacheRuntimeOnly.extendsFrom(testRuntimeOnly) quarkusOrmPanacheCompileOnly.extendsFrom(testCompileOnly) quarkusHrPanacheImplementation.extendsFrom(testImplementation) quarkusHrPanacheRuntimeOnly.extendsFrom(testRuntimeOnly) quarkusHrPanacheCompileOnly.extendsFrom(testCompileOnly) jakartaDataImplementation.extendsFrom(testImplementation) jakartaDataRuntimeOnly.extendsFrom(testRuntimeOnly) jakartaDataCompileOnly.extendsFrom(testCompileOnly) } def quarkusOrmPanacheTestTask = tasks.register( 'quarkusOrmPanacheTest', Test ) { description = 'Runs the Quarkus ORM Panache tests.' group = 'verification' testClassesDirs = sourceSets.quarkusOrmPanache.output.classesDirs classpath = sourceSets.quarkusOrmPanache.runtimeClasspath shouldRunAfter test } def quarkusHrPanacheTestTask = tasks.register( 'quarkusHrPanacheTest', Test ) { description = 'Runs the Quarkus HR Panache tests.' group = 'verification' testClassesDirs = sourceSets.quarkusHrPanache.output.classesDirs classpath = sourceSets.quarkusHrPanache.runtimeClasspath shouldRunAfter test } def jakartaDataTestTask = tasks.register( 'jakartaDataTest', Test ) { description = 'Runs the Jakarta Data tests.' group = 'verification' testClassesDirs = sourceSets.jakartaData.output.classesDirs classpath = sourceSets.jakartaData.runtimeClasspath shouldRunAfter test } check.dependsOn quarkusHrPanacheTestTask check.dependsOn quarkusOrmPanacheTestTask test.dependsOn quarkusHrPanacheTestTask test.dependsOn quarkusOrmPanacheTestTask tasks.sourcesJar.dependsOn ':hibernate-core:generateHqlParser' tasks.sourcesJar.dependsOn ':hibernate-core:generateSqlScriptParser'