Skip to content

Commit

Permalink
Don't track absolute path as test input to improve cacheability (#52235)
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-vieira committed Feb 11, 2020
1 parent 77c8516 commit 22ee111
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down

0 comments on commit 22ee111

Please sign in to comment.