hibernate-orm/tooling/metamodel-generator/hibernate-processor.gradle

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

217 lines
6.6 KiB
Groovy
Raw Normal View History

2024-07-22 15:51:30 -04:00
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' )
2024-06-17 02:58:58 -04:00
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
}
2024-02-28 09:29:25 -05:00
}
dependencies {
// api - ewww... but Maven needs them this way
api project( ':hibernate-core' )
2024-04-03 23:18:20 -04:00
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)
2024-02-28 09:29:25 -05:00
}
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
2024-02-28 09:29:25 -05:00
shouldRunAfter test
}
tasks.named( "compileQuarkusOrmPanacheJava", JavaCompile ) {
sourceCompatibility = tasks.compileTestJava.sourceCompatibility
targetCompatibility = tasks.compileTestJava.targetCompatibility
javaCompiler = tasks.compileTestJava.javaCompiler
}
2024-02-28 09:29:25 -05:00
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
2024-02-28 09:29:25 -05:00
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
}
2024-02-28 09:29:25 -05:00
check.dependsOn quarkusHrPanacheTestTask
check.dependsOn quarkusOrmPanacheTestTask
2024-09-09 10:00:18 -04:00
check.dependsOn jakartaDataTestTask
test.dependsOn quarkusHrPanacheTestTask
test.dependsOn quarkusOrmPanacheTestTask
2024-09-09 10:00:18 -04:00
test.dependsOn jakartaDataTestTask
2024-02-28 09:29:25 -05:00
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
}
}
}
}
}
2024-07-22 15:51:30 -04:00
}
tasks.forbiddenApisJakartaData {
enabled = false
}
tasks.forbiddenApisQuarkusOrmPanache {
enabled = false
}
tasks.forbiddenApisQuarkusHrPanache {
enabled = false
}