Unverified Commit ece69c52 authored by Daz DeBoer's avatar Daz DeBoer
Browse files

Save project-root-list in RUNNER_TEMP dir

This feels better than saving in Gradle User Home and is consistent
with where the build results are written.
parent 14c898b5
Loading
Loading
Loading
Loading
+1 −1
Changes for src/cache-extract-entries.ts: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -387,7 +387,7 @@ export class ConfigurationCacheEntryExtractor extends AbstractEntryExtractor {
     * set of project roots, to allow saving of configuration-cache entries for each.
     */
    private getProjectRoots(): string[] {
        const projectList = path.resolve(this.gradleUserHome, PROJECT_ROOTS_FILE)
        const projectList = path.resolve(process.env['RUNNER_TEMP']!, PROJECT_ROOTS_FILE)
        if (!fs.existsSync(projectList)) {
            core.info(`Missing project list file ${projectList}`)
            return []
+1 −1
Changes for src/resources/project-root-capture.plugin.groovy: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ import org.gradle.tooling.events.*

settingsEvaluated { settings ->
    def rootDir = settings.rootDir.absolutePath
    def rootListLocation = new File(settings.gradle.gradleUserHomeDir, "project-roots.txt").absolutePath
    def rootListLocation = new File(System.getenv("RUNNER_TEMP"), "project-roots.txt").absolutePath

    def projectTracker = gradle.sharedServices.registerIfAbsent("gradle-build-action-projectRootTracker", ProjectTracker, { spec ->
        spec.getParameters().getRootDir().set(rootDir);