217 lines
6.6 KiB
Groovy
217 lines
6.6 KiB
Groovy
import de.thetaphi.forbiddenapis.gradle.CheckForbiddenApis
|
|
|
|
/*
|
|
* 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 <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
|
*/
|
|
description = 'Hibernate compile-time tooling'
|
|
|
|
apply from: rootProject.file( 'gradle/relocated-published-java-module.gradle' )
|
|
apply plugin: 'org.hibernate.build.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.hibernateModels
|
|
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
|
|
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.'
|
|
group = 'verification'
|
|
|
|
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.'
|
|
group = 'verification'
|
|
|
|
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
|
|
check.dependsOn jakartaDataTestTask
|
|
test.dependsOn quarkusHrPanacheTestTask
|
|
test.dependsOn quarkusOrmPanacheTestTask
|
|
test.dependsOn jakartaDataTestTask
|
|
|
|
tasks.sourcesJar.dependsOn ':hibernate-core:generateHqlParser'
|
|
tasks.sourcesJar.dependsOn ':hibernate-core:generateSqlScriptParser'
|
|
|
|
compileTestJava {
|
|
options.compilerArgs += [
|
|
"-proc:none",
|
|
"-AsuppressJakartaDataMetamodel=true"
|
|
]
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
// relocation for the published artifacts based on the old groupId
|
|
relocationPom(MavenPublication) {
|
|
pom {
|
|
name = 'hibernate-jpamodelgen - relocation'
|
|
groupId = 'org.hibernate.orm'
|
|
artifactId = 'hibernate-jpamodelgen'
|
|
version = project.version
|
|
|
|
description = project.description
|
|
url = 'https://hibernate.org/orm'
|
|
|
|
organization {
|
|
name = 'Hibernate.org'
|
|
url = 'https://hibernate.org'
|
|
}
|
|
|
|
licenses {
|
|
license {
|
|
name = 'GNU Library General Public License v2.1 or later'
|
|
url = 'https://www.opensource.org/licenses/LGPL-2.1'
|
|
comments = 'See discussion at https://hibernate.org/community/license/ for more details.'
|
|
distribution = 'repo'
|
|
}
|
|
}
|
|
|
|
scm {
|
|
url = 'https://github.com/hibernate/hibernate-orm'
|
|
connection = 'scm:git:https://github.com/hibernate/hibernate-orm.git'
|
|
developerConnection = 'scm:git:git@github.com:hibernate/hibernate-orm.git'
|
|
}
|
|
|
|
developers {
|
|
developer {
|
|
id = 'hibernate-team'
|
|
name = 'The Hibernate Development Team'
|
|
organization = 'Hibernate.org'
|
|
organizationUrl = 'https://hibernate.org'
|
|
}
|
|
}
|
|
|
|
issueManagement {
|
|
system = 'jira'
|
|
url = 'https://hibernate.atlassian.net/browse/HHH'
|
|
}
|
|
|
|
distributionManagement {
|
|
relocation {
|
|
groupId = 'org.hibernate.orm'
|
|
artifactId = project.name
|
|
version = project.version
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
tasks.forbiddenApisJakartaData {
|
|
enabled = false
|
|
}
|
|
|
|
tasks.forbiddenApisQuarkusOrmPanache {
|
|
enabled = false
|
|
}
|
|
|
|
tasks.forbiddenApisQuarkusHrPanache {
|
|
enabled = false
|
|
} |