Skip to content

Commit 333a0d6

Browse files
Vampirembellade
authored andcommitted
HHH-19876 Do not consider each and every project and system property a configuration cache input
1 parent 91d6666 commit 333a0d6

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

hibernate-core/hibernate-core.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ tasks.withType( Test.class ).each { test ->
277277
// Most systems have multi-threading and maxing out a core on both threads will hurt performance
278278
// Also, as soon as we hit 16+ threads, the returns are diminishing, so divide by 4
279279
def threadCount = Runtime.runtime.availableProcessors()
280-
def testThreads = project.getProperties().get( "test.threads" )
280+
def testThreads = project.findProperty( "test.threads" )
281281
if ( testThreads == null ) {
282282
testThreads = threadCount >= 16 ? threadCount.intdiv( 4 ) : (threadCount.intdiv( 2 ) ?: 1)
283283
}

hibernate-envers/hibernate-envers.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ tasks.withType( Test.class ).each { test ->
6262
// Most systems have multi-threading and maxing out a core on both threads will hurt performance
6363
// Also, as soon as we hit 16+ threads, the returns are diminishing, so divide by 4
6464
def threadCount = Runtime.runtime.availableProcessors()
65-
def testThreads = project.getProperties().get( "test.threads" )
65+
def testThreads = project.findProperty( "test.threads" )
6666
if ( testThreads == null ) {
6767
testThreads = threadCount >= 16 ? threadCount.intdiv( 4 ) : (threadCount.intdiv( 2 ) ?: 1)
6868
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ tasks.withType( Test.class ).each { test ->
215215
test.systemProperties['hibernate.testing.bytecode.enhancement.extension.engine.enabled'] = true
216216
test.systemProperties['hibernate.test.validatefailureexpected'] = true
217217
test.systemProperties['hibernate.highlight_sql'] = false
218-
test.systemProperties += System.properties.findAll { it.key.startsWith( "hibernate." ) }
218+
test.systemProperties += providers.systemPropertiesPrefixedBy("hibernate.").get()
219219

220220
test.enableAssertions = true
221221

local-build-plugins/src/main/java/org/hibernate/orm/db/DatabaseServicePlugin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public void apply(Project project) {
2727
DatabaseService.class,
2828
spec -> spec.getMaxParallelUsages().set( 1 )
2929
);
30-
final String database = (String) project.getProperties().get( "db" );
30+
final String database = (String) project.findProperty( "db" );
3131

3232
// H2 and HSQLDB are in-memory, so there is no sharing that needs to be avoided
3333
if ( database != null && !"h2".equals( database ) && !"hsqldb".equals( database ) ) {

local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JavaModulePlugin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public void execute(Test testTask) {
123123
if ( project.hasProperty( "test.jdk.launcher.args" ) ) {
124124
testTask.jvmArgs(
125125
Arrays.asList(
126-
project.getProperties().get( "test.jdk.launcher.args" ).toString().split( " " )
126+
project.property( "test.jdk.launcher.args" ).toString().split( " " )
127127
)
128128
);
129129
}

local-build-plugins/src/main/java/org/hibernate/orm/toolchains/JdkVersionConfig.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,12 +217,12 @@ public static JavaLanguageVersion extractVersion(Settings settings, String prope
217217
}
218218

219219
public static JavaLanguageVersion extractVersion(Project project, String propertyName) {
220-
final Object projectProp = project.getProperties().get( propertyName );
220+
final Object projectProp = project.findProperty( propertyName );
221221
if ( projectProp != null ) {
222222
return JavaLanguageVersion.of( projectProp.toString() );
223223
}
224224

225-
final Object sysProp = System.getProperties().get( propertyName );
225+
final Object sysProp = System.getProperty( propertyName );
226226
if ( sysProp != null ) {
227227
return JavaLanguageVersion.of( sysProp.toString() );
228228
}

0 commit comments

Comments
 (0)