Don't track absolute path as test input to improve cacheability (#52235)

This commit is contained in:
Mark Vieira 2020-02-11 13:32:59 -08:00 committed by GitHub
parent d48ce12920
commit 28c56da754
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -732,8 +732,7 @@ class BuildPlugin implements Plugin<Project> {
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<Project> {
}
// 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