Don't track absolute path as test input to improve cacheability (#52235)
This commit is contained in:
parent
d48ce12920
commit
28c56da754
|
@ -732,8 +732,7 @@ class BuildPlugin implements Plugin<Project> {
|
||||||
test.jvmArgs '-ea', '-esa'
|
test.jvmArgs '-ea', '-esa'
|
||||||
}
|
}
|
||||||
|
|
||||||
test.systemProperties 'gradle.dist.lib': new File(project.class.location.toURI()).parent,
|
test.systemProperties 'java.awt.headless': 'true',
|
||||||
'java.awt.headless': 'true',
|
|
||||||
'tests.gradle': 'true',
|
'tests.gradle': 'true',
|
||||||
'tests.artifact': project.name,
|
'tests.artifact': project.name,
|
||||||
'tests.task': test.path,
|
'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
|
// 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.worker.jar', "${project.gradle.getGradleUserHomeDir()}/caches/${project.gradle.gradleVersion}/workerMain/gradle-worker.jar")
|
||||||
nonInputProperties.systemProperty('gradle.user.home', project.gradle.getGradleUserHomeDir())
|
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
|
// we use 'temp' relative to CWD since this is per JVM and tests are forbidden from writing to CWD
|
||||||
|
|
Loading…
Reference in New Issue