From 28c56da75495bcd94f35a646d8f67f9ef97b28a5 Mon Sep 17 00:00:00 2001 From: Mark Vieira Date: Tue, 11 Feb 2020 13:32:59 -0800 Subject: [PATCH] Don't track absolute path as test input to improve cacheability (#52235) --- .../main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy index d7d8facc5d6..c7604a48dfc 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy @@ -732,8 +732,7 @@ class BuildPlugin implements Plugin { test.jvmArgs '-ea', '-esa' } - test.systemProperties 'gradle.dist.lib': new File(project.class.location.toURI()).parent, - 'java.awt.headless': 'true', + test.systemProperties 'java.awt.headless': 'true', 'tests.gradle': 'true', 'tests.artifact': project.name, 'tests.task': test.path, @@ -748,6 +747,7 @@ class BuildPlugin implements Plugin { } // don't track these as inputs since they contain absolute paths and break cache relocatability + nonInputProperties.systemProperty('gradle.dist.lib', new File(project.class.location.toURI()).parent) nonInputProperties.systemProperty('gradle.worker.jar', "${project.gradle.getGradleUserHomeDir()}/caches/${project.gradle.gradleVersion}/workerMain/gradle-worker.jar") nonInputProperties.systemProperty('gradle.user.home', project.gradle.getGradleUserHomeDir()) // we use 'temp' relative to CWD since this is per JVM and tests are forbidden from writing to CWD