2021-04-22 12:15:45 -04:00
|
|
|
/*
|
|
|
|
* 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\'s entity version (audit/history) support Jakarta edition'
|
|
|
|
|
2021-07-01 22:15:55 -04:00
|
|
|
apply from: rootProject.file( 'gradle/published-jakarta-java-module.gradle' )
|
2021-04-22 12:15:45 -04:00
|
|
|
|
2021-06-26 09:46:09 -04:00
|
|
|
evaluationDependsOn( ':hibernate-envers' )
|
2021-06-28 16:59:35 -04:00
|
|
|
evaluationDependsOn( ':hibernate-transaction-client' )
|
2021-04-22 12:15:45 -04:00
|
|
|
|
|
|
|
dependencies {
|
2021-07-27 20:53:42 -04:00
|
|
|
api project( ':hibernate-core-jakarta' )
|
2021-04-22 12:15:45 -04:00
|
|
|
|
2021-06-26 09:46:09 -04:00
|
|
|
testImplementation( project( ':hibernate-envers-jakarta' ) )
|
|
|
|
testImplementation( project( ':hibernate-testing-jakarta' ) )
|
|
|
|
}
|
|
|
|
|
2021-04-22 12:15:45 -04:00
|
|
|
|
2021-06-26 09:46:09 -04:00
|
|
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
// main jar
|
|
|
|
|
2021-07-01 22:15:55 -04:00
|
|
|
//tasks.jar {
|
|
|
|
// enabled false
|
|
|
|
//}
|
|
|
|
//
|
|
|
|
//task jakartafyJar( type: JakartaJarTransformation ) {
|
|
|
|
// sourceJar = project(':hibernate-envers').tasks.jar.archiveFile
|
|
|
|
// targetJar = tasks.jar.archiveFile
|
|
|
|
//}
|
|
|
|
//
|
|
|
|
//tasks.jar.dependsOn project(':hibernate-envers').tasks.jar
|
|
|
|
//tasks.jar.finalizedBy tasks.jakartafyJar
|
|
|
|
//tasks.jakartafyJar.dependsOn tasks.jar
|
|
|
|
//tasks.jakartafyJar.mustRunAfter tasks.jar
|
2021-06-26 09:46:09 -04:00
|
|
|
|
|
|
|
|
|
|
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
// javadoc jar
|
|
|
|
|
2021-07-01 22:15:55 -04:00
|
|
|
//tasks.javadocJar {
|
|
|
|
// enabled false
|
|
|
|
//}
|
|
|
|
//
|
|
|
|
//task jakartafyJavadocJar( type: JakartaJarTransformation ) {
|
|
|
|
// sourceJar = project(':hibernate-envers').tasks.javadocJar.archiveFile
|
|
|
|
// targetJar = tasks.javadocJar.archiveFile
|
|
|
|
//}
|
|
|
|
//
|
|
|
|
//tasks.javadocJar.dependsOn project(':hibernate-envers').tasks.javadocJar
|
|
|
|
//tasks.javadocJar.finalizedBy tasks.jakartafyJavadocJar
|
|
|
|
//tasks.jakartafyJavadocJar.dependsOn tasks.javadocJar
|
|
|
|
//tasks.jakartafyJavadocJar.mustRunAfter tasks.javadocJar
|
2021-06-26 09:46:09 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
// sources jar
|
|
|
|
|
2021-07-01 22:15:55 -04:00
|
|
|
//tasks.sourcesJar {
|
|
|
|
// enabled false
|
|
|
|
//}
|
|
|
|
//
|
|
|
|
//task jakartafySourcesJar( type: JakartaJarTransformation ) {
|
|
|
|
// sourceJar = project(':hibernate-envers').tasks.sourcesJar.archiveFile
|
|
|
|
// targetJar = tasks.javadocJar.archiveFile
|
|
|
|
//}
|
|
|
|
//
|
|
|
|
//tasks.sourcesJar.dependsOn project(':hibernate-envers').tasks.sourcesJar
|
|
|
|
//tasks.sourcesJar.finalizedBy tasks.jakartafySourcesJar
|
|
|
|
//tasks.jakartafySourcesJar.dependsOn tasks.sourcesJar
|
|
|
|
//tasks.jakartafySourcesJar.mustRunAfter tasks.sourcesJar
|
|
|
|
//
|
2021-06-26 09:46:09 -04:00
|
|
|
|
|
|
|
|
|
|
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
// testing
|
|
|
|
|
2021-07-01 22:15:55 -04:00
|
|
|
//project.ext {
|
|
|
|
// testClassesUnpackTargetDirectory = project.layout.buildDirectory.dir( 'jakarta/unpack/classes' )
|
|
|
|
// testClassesTransformationTargetDirectory = project.layout.buildDirectory.dir( 'jakarta/test/classes' )
|
|
|
|
//}
|
|
|
|
//
|
|
|
|
//tasks.compileTestJava {
|
|
|
|
// enabled false
|
|
|
|
//}
|
|
|
|
//
|
|
|
|
//tasks.processTestResources {
|
|
|
|
// enabled false
|
|
|
|
//}
|
|
|
|
//
|
|
|
|
//task unpackTests(type: Copy) {
|
|
|
|
// from zipTree( project( ':hibernate-envers' ).tasks.testJar.archiveFile )
|
|
|
|
// into project.testClassesUnpackTargetDirectory
|
|
|
|
//}
|
|
|
|
//
|
|
|
|
//task jakartafyTests(type: JakartaDirectoryTransformation) {
|
|
|
|
// sourceDirectory = project.testClassesUnpackTargetDirectory
|
|
|
|
// targetDirectory = project.testClassesTransformationTargetDirectory
|
|
|
|
//}
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//tasks.compileTestJava.dependsOn tasks.unpackTests
|
|
|
|
//tasks.compileTestJava.finalizedBy tasks.jakartafyTests
|
|
|
|
//
|
|
|
|
//tasks.unpackTests.dependsOn project(':hibernate-envers').tasks.testJar
|
|
|
|
//
|
|
|
|
//tasks.jakartafyTests.dependsOn tasks.unpackTests
|
2021-06-26 09:46:09 -04:00
|
|
|
|
|
|
|
tasks.test {
|
|
|
|
dependsOn tasks.jakartafyTests
|
|
|
|
testClassesDirs += project.files( tasks.jakartafyTests.targetDirectory )
|
|
|
|
classpath += project.files( tasks.jakartafyTests.targetDirectory )
|
|
|
|
|
2021-05-07 03:50:35 -04:00
|
|
|
systemProperty 'file.encoding', 'utf-8'
|
|
|
|
|
|
|
|
if ( gradle.ext.javaVersions.test.launcher.asInt() >= 9 ) {
|
|
|
|
// See org.hibernate.boot.model.naming.NamingHelperTest.DefaultCharset.set
|
|
|
|
jvmArgs( ['--add-opens', 'java.base/java.nio.charset=ALL-UNNAMED'] )
|
|
|
|
// Weld needs this to generate proxies
|
|
|
|
jvmArgs( ['--add-opens', 'java.base/java.security=ALL-UNNAMED'] )
|
|
|
|
jvmArgs( ['--add-opens', 'java.base/java.lang=ALL-UNNAMED'] )
|
|
|
|
}
|
2021-06-26 09:46:09 -04:00
|
|
|
}
|
|
|
|
|
2021-06-28 16:59:35 -04:00
|
|
|
tasks.test.dependsOn ':hibernate-transaction-client:jar'
|
2021-06-26 09:46:09 -04:00
|
|
|
|
2021-07-01 22:15:55 -04:00
|
|
|
//task testJar(type: Jar, dependsOn: testClasses) {
|
|
|
|
// duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
|
|
// archiveClassifier.set( 'test' )
|
|
|
|
// from sourceSets.test.output
|
|
|
|
//}
|
|
|
|
//
|
|
|
|
//artifacts {
|
|
|
|
// tests tasks.testJar
|
|
|
|
//}
|