@@ -48,48 +48,47 @@ dependencies {
48
48
' org.eclipse.transformer:org.eclipse.transformer:0.2.0' ,
49
49
' org.eclipse.transformer:org.eclipse.transformer.cli:0.2.0'
50
50
51
- // todo: enable again when we can finally use the Jakarta JARs from narayana
52
- // testCompile( project(':hibernate-testing-jakarta') )
53
- // testCompile fileTree(dir: 'libs', include: '*.jar')
54
- //
55
- // testCompile( libraries.shrinkwrap_api )
56
- // testCompile( libraries.shrinkwrap )
57
- // testCompile( libraries.jakarta_jacc )
58
- // testCompile( libraries.jakarta_validation )
59
- // testCompile( libraries.jandex )
60
- // testCompile( libraries.classmate )
61
- // testCompile( libraries.mockito )
62
- // testCompile( libraries.mockito_inline )
63
- // testCompile( libraries.jodaTime )
64
- // testCompile( libraries.assertj )
65
- //
66
- // testCompile( libraries.jakarta_cdi )
67
- //
68
- // testCompile( libraries.jakarta_validator ) {
69
- // // for test runtime
70
- // transitive = true
71
- // }
72
- //
73
- // // for testing stored procedure support
74
- // testCompile( libraries.derby )
75
- //
76
- // testRuntime( "org.jboss.spec.javax.ejb:jboss-ejb-api_3.2_spec:1.0.0.Final" )
77
- // testRuntime( libraries.jakarta_el )
78
- // testRuntime( 'jaxen:jaxen:1.1' )
79
- // testRuntime( libraries.javassist )
80
- // testRuntime( libraries.byteBuddy )
81
- // testRuntime( libraries.jakarta_weld )
82
- // testRuntime( libraries.atomikos )
83
- // testRuntime( libraries.atomikos_jta )
84
- // // todo (jakarta): replace this when the jakarta artifact is released
85
- // testRuntime( project(':hibernate-transaction-client') )
86
- // // testRuntime( libraries.wildfly_transaction_client_jakarta )
87
- //
88
- // testCompile libraries.shrinkwrap_descriptors_api_javaee
89
- // testCompile libraries.shrinkwrap_descriptors_impl_javaee
90
- //
91
- // testCompile libraries.jboss_ejb_spec_jar
92
- // testCompile libraries.jboss_annotation_spec_jar
51
+ testCompile( project(' :hibernate-testing-jakarta' ) )
52
+ testCompile fileTree(dir : ' libs' , include : ' *.jar' )
53
+
54
+ testCompile( libraries. shrinkwrap_api )
55
+ testCompile( libraries. shrinkwrap )
56
+ testCompile( libraries. jakarta_jacc )
57
+ testCompile( libraries. jakarta_validation )
58
+ testCompile( libraries. jandex )
59
+ testCompile( libraries. classmate )
60
+ testCompile( libraries. mockito )
61
+ testCompile( libraries. mockito_inline )
62
+ testCompile( libraries. jodaTime )
63
+ testCompile( libraries. assertj )
64
+
65
+ testCompile( libraries. jakarta_cdi )
66
+
67
+ testCompile( libraries. jakarta_validator ) {
68
+ // for test runtime
69
+ transitive = true
70
+ }
71
+
72
+ // for testing stored procedure support
73
+ testCompile( libraries. derby )
74
+
75
+ testRuntime( " org.jboss.spec.javax.ejb:jboss-ejb-api_3.2_spec:1.0.0.Final" )
76
+ testRuntime( libraries. jakarta_el )
77
+ testRuntime( ' jaxen:jaxen:1.1' )
78
+ testRuntime( libraries. javassist )
79
+ testRuntime( libraries. byteBuddy )
80
+ testRuntime( libraries. jakarta_weld )
81
+ testRuntime( libraries. atomikos )
82
+ testRuntime( libraries. atomikos_jta )
83
+ // todo (jakarta): replace this when the jakarta artifact is released
84
+ testRuntime( project(' :hibernate-transaction-client' ) )
85
+ // testRuntime( libraries.wildfly_transaction_client_jakarta )
86
+
87
+ testCompile libraries. shrinkwrap_descriptors_api_javaee
88
+ testCompile libraries. shrinkwrap_descriptors_impl_javaee
89
+
90
+ testCompile libraries. jboss_ejb_spec_jar
91
+ testCompile libraries. jboss_annotation_spec_jar
93
92
}
94
93
95
94
jar {
@@ -134,52 +133,51 @@ jar {
134
133
}
135
134
}
136
135
137
- // todo: enable again when we can finally use the Jakarta JARs from narayana
138
- // task unpackTestJar(type: Copy) {
139
- // dependsOn jar
140
- // fileTree(project.buildDir).matching { include 'libs/*-test.jar' }.each {
141
- // def outputDir = file("${buildDir}/unpacked/" + it.name)
142
- // from zipTree(it)
143
- // into outputDir
144
- // }
145
- // }
146
- //
147
- // task copyBundleResources (type: Copy) {
148
- // dependsOn unpackTestJar
149
- // File unpackedDir = new File(project.buildDir, "libs/hibernate-core-jakarta-${project.version}-test.jar")
150
- // ext {
151
- // bundlesTargetDir = file( "${buildDir}/bundles" )
152
- // bundleTokens = dbBundle[db]
153
- // ext.bundleTokens['buildDirName'] = buildDir.absolutePath
154
- // }
155
- //
156
- // from file("${buildDir}/unpacked/${unpackedDir.name}/templates")
157
- // into ext.bundlesTargetDir
158
- // filter( ReplaceTokens, tokens: ext.bundleTokens)
159
- // doFirst {
160
- // ext.bundlesTargetDir.mkdirs()
161
- // }
162
- // }
163
- //
164
- // processTestResources.dependsOn copyBundleResources
165
- //
166
- // artifacts {
167
- // tests new File(project.buildDir, "libs/hibernate-core-jakarta-${project.version}-test.jar")
168
- // }
169
- //
170
- // test {
171
- // fileTree(project.buildDir).matching { include 'libs/*-test.jar' }.each {
172
- // def outputDir = file("${buildDir}/unpacked/" + it.name)
173
- // testClassesDirs += files(outputDir)
174
- // classpath += files(outputDir)
175
- // }
176
- // systemProperty 'file.encoding', 'utf-8'
177
- //
178
- // if ( gradle.ext.javaVersions.test.launcher.asInt() >= 9 ) {
179
- // // See org.hibernate.boot.model.naming.NamingHelperTest.DefaultCharset.set
180
- // jvmArgs( ['--add-opens', 'java.base/java.nio.charset=ALL-UNNAMED'] )
181
- // // Weld needs this to generate proxies
182
- // jvmArgs( ['--add-opens', 'java.base/java.security=ALL-UNNAMED'] )
183
- // jvmArgs( ['--add-opens', 'java.base/java.lang=ALL-UNNAMED'] )
184
- // }
185
- // }
136
+ task unpackTestJar (type : Copy ) {
137
+ dependsOn jar
138
+ fileTree(project. buildDir). matching { include ' libs/*-test.jar' }. each {
139
+ def outputDir = file(" ${ buildDir} /unpacked/" + it. name)
140
+ from zipTree(it)
141
+ into outputDir
142
+ }
143
+ }
144
+
145
+ task copyBundleResources (type : Copy ) {
146
+ dependsOn unpackTestJar
147
+ File unpackedDir = new File (project. buildDir, " libs/hibernate-core-jakarta-${ project.version} -test.jar" )
148
+ ext {
149
+ bundlesTargetDir = file( " ${ buildDir} /bundles" )
150
+ bundleTokens = dbBundle[db]
151
+ ext. bundleTokens[' buildDirName' ] = buildDir. absolutePath
152
+ }
153
+
154
+ from file(" ${ buildDir} /unpacked/${ unpackedDir.name} /templates" )
155
+ into ext. bundlesTargetDir
156
+ filter( ReplaceTokens , tokens : ext. bundleTokens)
157
+ doFirst {
158
+ ext. bundlesTargetDir. mkdirs()
159
+ }
160
+ }
161
+
162
+ processTestResources. dependsOn copyBundleResources
163
+
164
+ artifacts {
165
+ tests new File (project. buildDir, " libs/hibernate-core-jakarta-${ project.version} -test.jar" )
166
+ }
167
+
168
+ test {
169
+ fileTree(project. buildDir). matching { include ' libs/*-test.jar' }. each {
170
+ def outputDir = file(" ${ buildDir} /unpacked/" + it. name)
171
+ testClassesDirs + = files(outputDir)
172
+ classpath + = files(outputDir)
173
+ }
174
+ systemProperty ' file.encoding' , ' utf-8'
175
+
176
+ if ( gradle. ext. javaVersions. test. launcher. asInt() >= 9 ) {
177
+ // See org.hibernate.boot.model.naming.NamingHelperTest.DefaultCharset.set
178
+ jvmArgs( [' --add-opens' , ' java.base/java.nio.charset=ALL-UNNAMED' ] )
179
+ // Weld needs this to generate proxies
180
+ jvmArgs( [' --add-opens' , ' java.base/java.security=ALL-UNNAMED' ] )
181
+ jvmArgs( [' --add-opens' , ' java.base/java.lang=ALL-UNNAMED' ] )
182
+ }
183
+ }
0 commit comments