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 = 'Support for testing Hibernate ORM Jakarta functionality'
|
|
|
|
|
2021-06-26 09:46:09 -04:00
|
|
|
|
2021-07-01 22:15:55 -04:00
|
|
|
apply from: rootProject.file( 'gradle/published-jakarta-java-module.gradle' )
|
2021-04-23 06:07:20 -04:00
|
|
|
|
2021-06-26 09:46:09 -04:00
|
|
|
evaluationDependsOn( ':hibernate-testing' )
|
2021-04-22 12:15:45 -04:00
|
|
|
|
|
|
|
dependencies {
|
2021-05-25 12:11:29 -04:00
|
|
|
api project( ':hibernate-core-jakarta' )
|
|
|
|
|
|
|
|
api libraries.junit
|
|
|
|
api libraries.junit5_api
|
|
|
|
api libraries.junit5_params
|
|
|
|
api 'org.hamcrest:hamcrest-all:1.3'
|
|
|
|
api libraries.byteman
|
|
|
|
api libraries.byteman_install
|
|
|
|
api libraries.byteman_bmunit
|
|
|
|
|
|
|
|
api libraries.xapool
|
|
|
|
api( libraries.jboss_tx_spi_jakarta ) {
|
2021-04-23 06:07:20 -04:00
|
|
|
transitive=false;
|
|
|
|
}
|
2021-05-25 12:11:29 -04:00
|
|
|
api( libraries.jboss_jta_jakarta ) {
|
2021-05-07 03:50:35 -04:00
|
|
|
transitive=false;
|
|
|
|
}
|
2021-04-22 12:15:45 -04:00
|
|
|
|
2021-05-25 12:11:29 -04:00
|
|
|
api 'javax.money:money-api:1.0.1'
|
|
|
|
api 'org.javamoney:moneta:1.1'
|
|
|
|
|
2021-05-31 08:55:18 -04:00
|
|
|
api libraries.log4j2
|
|
|
|
|
2021-06-26 09:46:09 -04:00
|
|
|
implementation project( ':hibernate-transaction-client' )
|
|
|
|
|
|
|
|
testImplementation fileTree(dir: 'libs', include: '*.jar')
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
// main jar
|
|
|
|
|
2021-07-01 22:15:55 -04:00
|
|
|
//tasks.jar {
|
|
|
|
// enabled false
|
|
|
|
//}
|
|
|
|
//
|
|
|
|
//task jakartafyJar( type: JakartaJarTransformation ) {
|
|
|
|
// sourceJar = project(':hibernate-testing').tasks.jar.archiveFile
|
|
|
|
// targetJar = tasks.jar.archiveFile
|
|
|
|
//}
|
|
|
|
//
|
|
|
|
//tasks.jar.dependsOn project(':hibernate-testing').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-testing').tasks.javadocJar.archiveFile
|
|
|
|
// targetJar = tasks.javadocJar.archiveFile
|
|
|
|
//}
|
|
|
|
//
|
|
|
|
//tasks.javadocJar.dependsOn project(':hibernate-testing').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-testing').tasks.sourcesJar.archiveFile
|
|
|
|
// targetJar = tasks.javadocJar.archiveFile
|
|
|
|
//}
|
|
|
|
//
|
|
|
|
//tasks.sourcesJar.dependsOn project(':hibernate-testing').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-testing' ).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-testing').tasks.testJar
|
|
|
|
//
|
|
|
|
//tasks.jakartafyTests.dependsOn tasks.unpackTests
|
|
|
|
//
|
|
|
|
//tasks.test {
|
|
|
|
// testClassesDirs += project.files( tasks.jakartafyTests.targetDirectory )
|
|
|
|
// classpath += project.files( tasks.jakartafyTests.targetDirectory )
|
|
|
|
//
|
|
|
|
// 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'] )
|
|
|
|
// }
|
|
|
|
//}
|
|
|
|
//
|
|
|
|
//task testJar(type: Jar, dependsOn: testClasses) {
|
|
|
|
// duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
|
|
// archiveClassifier.set( 'test' )
|
|
|
|
// from tasks.jakartafyTests.targetDirectory
|
|
|
|
//}
|
|
|
|
//
|
|
|
|
//artifacts {
|
|
|
|
// tests tasks.testJar
|
|
|
|
//}
|
|
|
|
//
|