Skip to content

Commit 9a42ca7

Browse files
committed
HHH-19673 Do not run Jacoco in hibernate-gradle-plugin
It's incompatible with TestKit: https://docs.gradle.org/8.14.3/userguide/configuration_cache.html#config_cache:not_yet_implemented:testkit_build_with_java_agent
1 parent 53d34d9 commit 9a42ca7

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

hibernate-integrationtest-java-modules/hibernate-integrationtest-java-modules.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ plugins {
77
id "local.java-module"
88
}
99

10+
def skipJacoco = project.hasProperty('skipJacoco') ? project.getProperty('skipJacoco').toBoolean() : false
11+
if (!skipJacoco) {
12+
plugins.apply('jacoco')
13+
}
14+
1015
description = 'Integration tests for running Hibernate ORM in the Java module path'
1116

1217
// See https://docs.gradle.org/6.7.1/userguide/java_testing.html#blackbox_integration_testing

local-build-plugins/src/main/groovy/local.java-module.gradle

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@ def jpaVersion = ormBuildDetails.jpaVersion
2626
def java9ModuleNameBase = project.name.startsWith( 'hibernate-' ) ? name.drop( 'hibernate-'.length() ): name
2727
def java9ModuleName = "org.hibernate.orm.$java9ModuleNameBase".replace('-','.')
2828

29-
def skipJacoco = project.hasProperty('skipJacoco') ? project.getProperty('skipJacoco').toBoolean() : false
30-
if (!skipJacoco) {
31-
plugins.apply('jacoco')
32-
}
33-
3429
sourceSets {
3530
test {
3631
resources {

local-build-plugins/src/main/groovy/local.publishing-java-module.gradle

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ plugins {
99
id "local.code-quality"
1010
}
1111

12+
// Ideally this should be in `local.java-module.gradle`,
13+
// but we need to skip this in hibernate-gradle-plugin.
14+
def skipJacoco = project.hasProperty('skipJacoco') ? project.getProperty('skipJacoco').toBoolean() : false
15+
if (!skipJacoco) {
16+
plugins.apply('jacoco')
17+
}
18+
1219
configurations {
1320
javadocSources {
1421
description = "All Java sources for the project's Javadoc"

0 commit comments

Comments
 (0)