Loading src/cache-base.ts +1 −7 Changes for src/cache-base.ts: 1 added line, 7 removed lines. Original line number Diff line number Diff line Loading @@ -9,7 +9,6 @@ import {ConfigurationCacheEntryExtractor, GradleHomeEntryExtractor} from './cach const RESTORED_CACHE_KEY_KEY = 'restored-cache-key' export const META_FILE_DIR = '.gradle-build-action' export const PROJECT_ROOTS_FILE = 'project-roots.txt' const INCLUDE_PATHS_PARAMETER = 'gradle-home-cache-includes' const EXCLUDE_PATHS_PARAMETER = 'gradle-home-cache-excludes' Loading Loading @@ -170,12 +169,7 @@ export class GradleStateCache { const propertiesFile = path.resolve(gradleUserHome, 'gradle.properties') fs.appendFileSync(propertiesFile, 'org.gradle.daemon=false') const initScriptFilenames = [ 'build-result-capture.init.gradle', 'build-result-capture-service.plugin.groovy', 'project-root-capture.init.gradle', 'project-root-capture.plugin.groovy' ] const initScriptFilenames = ['build-result-capture.init.gradle', 'build-result-capture-service.plugin.groovy'] for (const initScriptFilename of initScriptFilenames) { const initScriptContent = this.readResourceAsString(initScriptFilename) const initScriptPath = path.resolve(initScriptsDir, initScriptFilename) Loading src/cache-extract-entries.ts +5 −9 Changes for src/cache-extract-entries.ts: 5 added lines, 9 removed lines. Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ import fs from 'fs' import * as core from '@actions/core' import * as glob from '@actions/glob' import {META_FILE_DIR, PROJECT_ROOTS_FILE} from './cache-base' import {META_FILE_DIR} from './cache-base' import {CacheEntryListener, CacheListener} from './cache-reporting' import { cacheDebug, Loading @@ -14,6 +14,7 @@ import { saveCache, tryDelete } from './cache-utils' import {loadBuildResults} from './job-summary' const SKIP_RESTORE_VAR = 'GRADLE_BUILD_ACTION_SKIP_RESTORE' Loading Loading @@ -387,13 +388,8 @@ 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(process.env['RUNNER_TEMP']!, PROJECT_ROOTS_FILE) if (!fs.existsSync(projectList)) { core.info(`Missing project list file ${projectList}`) return [] } const projectRoots = fs.readFileSync(projectList, 'utf-8') core.info(`Found project roots '${projectRoots}' in ${projectList}`) return projectRoots.trim().split('\n') const buildResults = loadBuildResults() const projectRootDirs = buildResults.map(x => x.rootProjectDir) return [...new Set(projectRootDirs)] // Remove duplicates } } src/job-summary.ts +2 −2 Changes for src/job-summary.ts: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ import fs from 'fs' import path from 'path' import {logCachingReport, CacheListener} from './cache-reporting' interface BuildResult { export interface BuildResult { get rootProjectName(): string get rootProjectDir(): string get requestedTasks(): string Loading @@ -28,7 +28,7 @@ export function writeJobSummary(cacheListener: CacheListener): void { core.summary.write() } function loadBuildResults(): BuildResult[] { export function loadBuildResults(): BuildResult[] { const buildResultsDir = path.resolve(process.env['RUNNER_TEMP']!, '.build-results') if (!fs.existsSync(buildResultsDir)) { return [] Loading src/resources/project-root-capture.init.gradle −10 File deleted. Show changes src/resources/project-root-capture.plugin.groovy −40 File deleted. Show changes Loading
src/cache-base.ts +1 −7 Changes for src/cache-base.ts: 1 added line, 7 removed lines. Original line number Diff line number Diff line Loading @@ -9,7 +9,6 @@ import {ConfigurationCacheEntryExtractor, GradleHomeEntryExtractor} from './cach const RESTORED_CACHE_KEY_KEY = 'restored-cache-key' export const META_FILE_DIR = '.gradle-build-action' export const PROJECT_ROOTS_FILE = 'project-roots.txt' const INCLUDE_PATHS_PARAMETER = 'gradle-home-cache-includes' const EXCLUDE_PATHS_PARAMETER = 'gradle-home-cache-excludes' Loading Loading @@ -170,12 +169,7 @@ export class GradleStateCache { const propertiesFile = path.resolve(gradleUserHome, 'gradle.properties') fs.appendFileSync(propertiesFile, 'org.gradle.daemon=false') const initScriptFilenames = [ 'build-result-capture.init.gradle', 'build-result-capture-service.plugin.groovy', 'project-root-capture.init.gradle', 'project-root-capture.plugin.groovy' ] const initScriptFilenames = ['build-result-capture.init.gradle', 'build-result-capture-service.plugin.groovy'] for (const initScriptFilename of initScriptFilenames) { const initScriptContent = this.readResourceAsString(initScriptFilename) const initScriptPath = path.resolve(initScriptsDir, initScriptFilename) Loading
src/cache-extract-entries.ts +5 −9 Changes for src/cache-extract-entries.ts: 5 added lines, 9 removed lines. Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ import fs from 'fs' import * as core from '@actions/core' import * as glob from '@actions/glob' import {META_FILE_DIR, PROJECT_ROOTS_FILE} from './cache-base' import {META_FILE_DIR} from './cache-base' import {CacheEntryListener, CacheListener} from './cache-reporting' import { cacheDebug, Loading @@ -14,6 +14,7 @@ import { saveCache, tryDelete } from './cache-utils' import {loadBuildResults} from './job-summary' const SKIP_RESTORE_VAR = 'GRADLE_BUILD_ACTION_SKIP_RESTORE' Loading Loading @@ -387,13 +388,8 @@ 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(process.env['RUNNER_TEMP']!, PROJECT_ROOTS_FILE) if (!fs.existsSync(projectList)) { core.info(`Missing project list file ${projectList}`) return [] } const projectRoots = fs.readFileSync(projectList, 'utf-8') core.info(`Found project roots '${projectRoots}' in ${projectList}`) return projectRoots.trim().split('\n') const buildResults = loadBuildResults() const projectRootDirs = buildResults.map(x => x.rootProjectDir) return [...new Set(projectRootDirs)] // Remove duplicates } }
src/job-summary.ts +2 −2 Changes for src/job-summary.ts: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ import fs from 'fs' import path from 'path' import {logCachingReport, CacheListener} from './cache-reporting' interface BuildResult { export interface BuildResult { get rootProjectName(): string get rootProjectDir(): string get requestedTasks(): string Loading @@ -28,7 +28,7 @@ export function writeJobSummary(cacheListener: CacheListener): void { core.summary.write() } function loadBuildResults(): BuildResult[] { export function loadBuildResults(): BuildResult[] { const buildResultsDir = path.resolve(process.env['RUNNER_TEMP']!, '.build-results') if (!fs.existsSync(buildResultsDir)) { return [] Loading