[bot] Update dist directory
Some checks are pending
CI-check-and-unit-test / check-format-and-unit-test (push) Waiting to run
CI-codeql / Analyze (javascript-typescript) (push) Waiting to run
CI-init-script-check / test-init-scripts (push) Waiting to run
CI-integ-test / dependency-submission (push) Blocked by required conditions
CI-integ-test / dependency-submission-failures (push) Blocked by required conditions
CI-integ-test / develocity-injection (push) Blocked by required conditions
CI-integ-test / provision-gradle-versions (push) Blocked by required conditions
CI-integ-test / restore-configuration-cache (push) Blocked by required conditions
CI-integ-test / restore-containerized-gradle-home (push) Blocked by required conditions
CI-integ-test / restore-custom-gradle-home (push) Blocked by required conditions
CI-integ-test / restore-gradle-home (push) Blocked by required conditions
CI-integ-test / restore-java-toolchain (push) Blocked by required conditions
CI-integ-test / sample-kotlin-dsl (push) Blocked by required conditions
CI-integ-test / sample-gradle-plugin (push) Blocked by required conditions
CI-integ-test / toolchain-detection (push) Blocked by required conditions
CI-integ-test / wrapper-validation (push) Blocked by required conditions
CI-integ-test / determine-suite (push) Waiting to run
CI-integ-test / build-distribution (push) Blocked by required conditions
CI-integ-test / build-scan-publish (push) Blocked by required conditions
CI-integ-test / cache-cleanup (push) Blocked by required conditions
CI-integ-test / caching-config (push) Blocked by required conditions
CI-integ-test / dependency-graph (push) Blocked by required conditions
CI-update-dist / update-dist (push) Waiting to run

This commit is contained in:
bigdaz 2024-08-01 03:26:19 +00:00 committed by github-actions[bot]
parent fe594a580d
commit 479297d73e
8 changed files with 80 additions and 197 deletions

View file

@ -143226,9 +143226,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CacheCleaner = void 0; exports.CacheCleaner = void 0;
const core = __importStar(__nccwpck_require__(42186)); const core = __importStar(__nccwpck_require__(42186));
const exec = __importStar(__nccwpck_require__(71514));
const fs_1 = __importDefault(__nccwpck_require__(57147)); const fs_1 = __importDefault(__nccwpck_require__(57147));
const path_1 = __importDefault(__nccwpck_require__(71017)); const path_1 = __importDefault(__nccwpck_require__(71017));
const gradle_1 = __nccwpck_require__(94475); const provisioner = __importStar(__nccwpck_require__(14042));
class CacheCleaner { class CacheCleaner {
constructor(gradleUserHome, tmpDir) { constructor(gradleUserHome, tmpDir) {
this.gradleUserHome = gradleUserHome; this.gradleUserHome = gradleUserHome;
@ -143244,7 +143245,6 @@ class CacheCleaner {
await this.forceCleanupFilesOlderThan(cleanTimestamp); await this.forceCleanupFilesOlderThan(cleanTimestamp);
} }
async forceCleanupFilesOlderThan(cleanTimestamp) { async forceCleanupFilesOlderThan(cleanTimestamp) {
core.info(`Cleaning up caches before ${cleanTimestamp}`);
const cleanupProjectDir = path_1.default.resolve(this.tmpDir, 'dummy-cleanup-project'); const cleanupProjectDir = path_1.default.resolve(this.tmpDir, 'dummy-cleanup-project');
fs_1.default.mkdirSync(cleanupProjectDir, { recursive: true }); fs_1.default.mkdirSync(cleanupProjectDir, { recursive: true });
fs_1.default.writeFileSync(path_1.default.resolve(cleanupProjectDir, 'settings.gradle'), 'rootProject.name = "dummy-cleanup-project"'); fs_1.default.writeFileSync(path_1.default.resolve(cleanupProjectDir, 'settings.gradle'), 'rootProject.name = "dummy-cleanup-project"');
@ -143264,7 +143264,14 @@ class CacheCleaner {
} }
`); `);
fs_1.default.writeFileSync(path_1.default.resolve(cleanupProjectDir, 'build.gradle'), 'task("noop") {}'); fs_1.default.writeFileSync(path_1.default.resolve(cleanupProjectDir, 'build.gradle'), 'task("noop") {}');
await (0, gradle_1.provisionAndMaybeExecute)('current', cleanupProjectDir, [ const executable = await provisioner.provisionGradle('current');
await core.group('Executing Gradle to clean up caches', async () => {
core.info(`Cleaning up caches last used before ${cleanTimestamp}`);
await this.executeCleanupBuild(executable, cleanupProjectDir);
});
}
async executeCleanupBuild(executable, cleanupProjectDir) {
const args = [
'-g', '-g',
this.gradleUserHome, this.gradleUserHome,
'-I', '-I',
@ -143275,7 +143282,12 @@ class CacheCleaner {
'--build-cache', '--build-cache',
'-DGITHUB_DEPENDENCY_GRAPH_ENABLED=false', '-DGITHUB_DEPENDENCY_GRAPH_ENABLED=false',
'noop' 'noop'
]); ];
const result = await exec.getExecOutput(executable, args, {
cwd: cleanupProjectDir,
silent: true
});
core.info(result.stdout);
} }
} }
exports.CacheCleaner = CacheCleaner; exports.CacheCleaner = CacheCleaner;
@ -143864,7 +143876,9 @@ async function save(userHome, gradleUserHome, cacheListener, daemonController, b
cacheListener.setReadOnly(); cacheListener.setReadOnly();
return; return;
} }
await daemonController.stopAllDaemons(); await core.group('Stopping Gradle daemons', async () => {
await daemonController.stopAllDaemons();
});
if (cacheConfig.isCacheCleanupEnabled()) { if (cacheConfig.isCacheCleanupEnabled()) {
if (buildResults.anyConfigCacheHit()) { if (buildResults.anyConfigCacheHit()) {
core.info('Not performing cache-cleanup due to config-cache reuse'); core.info('Not performing cache-cleanup due to config-cache reuse');
@ -143885,7 +143899,6 @@ async function save(userHome, gradleUserHome, cacheListener, daemonController, b
} }
exports.save = save; exports.save = save;
async function performCacheCleanup(gradleUserHome) { async function performCacheCleanup(gradleUserHome) {
core.info('Forcing cache cleanup.');
const cacheCleaner = new cache_cleaner_1.CacheCleaner(gradleUserHome, process.env['RUNNER_TEMP']); const cacheCleaner = new cache_cleaner_1.CacheCleaner(gradleUserHome, process.env['RUNNER_TEMP']);
try { try {
await cacheCleaner.forceCleanup(); await cacheCleaner.forceCleanup();
@ -144930,7 +144943,6 @@ class DaemonController {
this.gradleHomes = buildResults.uniqueGradleHomes(); this.gradleHomes = buildResults.uniqueGradleHomes();
} }
async stopAllDaemons() { async stopAllDaemons() {
core.info('Stopping all Gradle daemons before saving Gradle User Home state');
const executions = []; const executions = [];
const args = ['--stop']; const args = ['--stop'];
for (const gradleHome of this.gradleHomes) { for (const gradleHome of this.gradleHomes) {

File diff suppressed because one or more lines are too long

View file

@ -97175,9 +97175,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CacheCleaner = void 0; exports.CacheCleaner = void 0;
const core = __importStar(__nccwpck_require__(2186)); const core = __importStar(__nccwpck_require__(2186));
const exec = __importStar(__nccwpck_require__(1514));
const fs_1 = __importDefault(__nccwpck_require__(7147)); const fs_1 = __importDefault(__nccwpck_require__(7147));
const path_1 = __importDefault(__nccwpck_require__(1017)); const path_1 = __importDefault(__nccwpck_require__(1017));
const gradle_1 = __nccwpck_require__(4475); const provisioner = __importStar(__nccwpck_require__(4042));
class CacheCleaner { class CacheCleaner {
constructor(gradleUserHome, tmpDir) { constructor(gradleUserHome, tmpDir) {
this.gradleUserHome = gradleUserHome; this.gradleUserHome = gradleUserHome;
@ -97193,7 +97194,6 @@ class CacheCleaner {
await this.forceCleanupFilesOlderThan(cleanTimestamp); await this.forceCleanupFilesOlderThan(cleanTimestamp);
} }
async forceCleanupFilesOlderThan(cleanTimestamp) { async forceCleanupFilesOlderThan(cleanTimestamp) {
core.info(`Cleaning up caches before ${cleanTimestamp}`);
const cleanupProjectDir = path_1.default.resolve(this.tmpDir, 'dummy-cleanup-project'); const cleanupProjectDir = path_1.default.resolve(this.tmpDir, 'dummy-cleanup-project');
fs_1.default.mkdirSync(cleanupProjectDir, { recursive: true }); fs_1.default.mkdirSync(cleanupProjectDir, { recursive: true });
fs_1.default.writeFileSync(path_1.default.resolve(cleanupProjectDir, 'settings.gradle'), 'rootProject.name = "dummy-cleanup-project"'); fs_1.default.writeFileSync(path_1.default.resolve(cleanupProjectDir, 'settings.gradle'), 'rootProject.name = "dummy-cleanup-project"');
@ -97213,7 +97213,14 @@ class CacheCleaner {
} }
`); `);
fs_1.default.writeFileSync(path_1.default.resolve(cleanupProjectDir, 'build.gradle'), 'task("noop") {}'); fs_1.default.writeFileSync(path_1.default.resolve(cleanupProjectDir, 'build.gradle'), 'task("noop") {}');
await (0, gradle_1.provisionAndMaybeExecute)('current', cleanupProjectDir, [ const executable = await provisioner.provisionGradle('current');
await core.group('Executing Gradle to clean up caches', async () => {
core.info(`Cleaning up caches last used before ${cleanTimestamp}`);
await this.executeCleanupBuild(executable, cleanupProjectDir);
});
}
async executeCleanupBuild(executable, cleanupProjectDir) {
const args = [
'-g', '-g',
this.gradleUserHome, this.gradleUserHome,
'-I', '-I',
@ -97224,7 +97231,12 @@ class CacheCleaner {
'--build-cache', '--build-cache',
'-DGITHUB_DEPENDENCY_GRAPH_ENABLED=false', '-DGITHUB_DEPENDENCY_GRAPH_ENABLED=false',
'noop' 'noop'
]); ];
const result = await exec.getExecOutput(executable, args, {
cwd: cleanupProjectDir,
silent: true
});
core.info(result.stdout);
} }
} }
exports.CacheCleaner = CacheCleaner; exports.CacheCleaner = CacheCleaner;
@ -97813,7 +97825,9 @@ async function save(userHome, gradleUserHome, cacheListener, daemonController, b
cacheListener.setReadOnly(); cacheListener.setReadOnly();
return; return;
} }
await daemonController.stopAllDaemons(); await core.group('Stopping Gradle daemons', async () => {
await daemonController.stopAllDaemons();
});
if (cacheConfig.isCacheCleanupEnabled()) { if (cacheConfig.isCacheCleanupEnabled()) {
if (buildResults.anyConfigCacheHit()) { if (buildResults.anyConfigCacheHit()) {
core.info('Not performing cache-cleanup due to config-cache reuse'); core.info('Not performing cache-cleanup due to config-cache reuse');
@ -97834,7 +97848,6 @@ async function save(userHome, gradleUserHome, cacheListener, daemonController, b
} }
exports.save = save; exports.save = save;
async function performCacheCleanup(gradleUserHome) { async function performCacheCleanup(gradleUserHome) {
core.info('Forcing cache cleanup.');
const cacheCleaner = new cache_cleaner_1.CacheCleaner(gradleUserHome, process.env['RUNNER_TEMP']); const cacheCleaner = new cache_cleaner_1.CacheCleaner(gradleUserHome, process.env['RUNNER_TEMP']);
try { try {
await cacheCleaner.forceCleanup(); await cacheCleaner.forceCleanup();
@ -98879,7 +98892,6 @@ class DaemonController {
this.gradleHomes = buildResults.uniqueGradleHomes(); this.gradleHomes = buildResults.uniqueGradleHomes();
} }
async stopAllDaemons() { async stopAllDaemons() {
core.info('Stopping all Gradle daemons before saving Gradle User Home state');
const executions = []; const executions = [];
const args = ['--stop']; const args = ['--stop'];
for (const gradleHome of this.gradleHomes) { for (const gradleHome of this.gradleHomes) {
@ -99322,61 +99334,6 @@ function handlePostActionError(error) {
exports.handlePostActionError = handlePostActionError; exports.handlePostActionError = handlePostActionError;
/***/ }),
/***/ 4475:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.provisionAndMaybeExecute = void 0;
const core = __importStar(__nccwpck_require__(2186));
const exec = __importStar(__nccwpck_require__(1514));
const provisioner = __importStar(__nccwpck_require__(4042));
const gradlew = __importStar(__nccwpck_require__(6807));
async function provisionAndMaybeExecute(gradleVersion, buildRootDirectory, args) {
const executable = await provisioner.provisionGradle(gradleVersion);
if (args.length > 0) {
await executeGradleBuild(executable, buildRootDirectory, args);
}
}
exports.provisionAndMaybeExecute = provisionAndMaybeExecute;
async function executeGradleBuild(executable, root, args) {
const toExecute = executable ?? gradlew.gradleWrapperScript(root);
const status = await exec.exec(toExecute, args, {
cwd: root,
ignoreReturnCode: true
});
if (status !== 0) {
core.setFailed(`Gradle build failed: see console output for details`);
}
}
/***/ }), /***/ }),
/***/ 6807: /***/ 6807:

File diff suppressed because one or more lines are too long

View file

@ -143214,9 +143214,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CacheCleaner = void 0; exports.CacheCleaner = void 0;
const core = __importStar(__nccwpck_require__(42186)); const core = __importStar(__nccwpck_require__(42186));
const exec = __importStar(__nccwpck_require__(71514));
const fs_1 = __importDefault(__nccwpck_require__(57147)); const fs_1 = __importDefault(__nccwpck_require__(57147));
const path_1 = __importDefault(__nccwpck_require__(71017)); const path_1 = __importDefault(__nccwpck_require__(71017));
const gradle_1 = __nccwpck_require__(94475); const provisioner = __importStar(__nccwpck_require__(14042));
class CacheCleaner { class CacheCleaner {
constructor(gradleUserHome, tmpDir) { constructor(gradleUserHome, tmpDir) {
this.gradleUserHome = gradleUserHome; this.gradleUserHome = gradleUserHome;
@ -143232,7 +143233,6 @@ class CacheCleaner {
await this.forceCleanupFilesOlderThan(cleanTimestamp); await this.forceCleanupFilesOlderThan(cleanTimestamp);
} }
async forceCleanupFilesOlderThan(cleanTimestamp) { async forceCleanupFilesOlderThan(cleanTimestamp) {
core.info(`Cleaning up caches before ${cleanTimestamp}`);
const cleanupProjectDir = path_1.default.resolve(this.tmpDir, 'dummy-cleanup-project'); const cleanupProjectDir = path_1.default.resolve(this.tmpDir, 'dummy-cleanup-project');
fs_1.default.mkdirSync(cleanupProjectDir, { recursive: true }); fs_1.default.mkdirSync(cleanupProjectDir, { recursive: true });
fs_1.default.writeFileSync(path_1.default.resolve(cleanupProjectDir, 'settings.gradle'), 'rootProject.name = "dummy-cleanup-project"'); fs_1.default.writeFileSync(path_1.default.resolve(cleanupProjectDir, 'settings.gradle'), 'rootProject.name = "dummy-cleanup-project"');
@ -143252,7 +143252,14 @@ class CacheCleaner {
} }
`); `);
fs_1.default.writeFileSync(path_1.default.resolve(cleanupProjectDir, 'build.gradle'), 'task("noop") {}'); fs_1.default.writeFileSync(path_1.default.resolve(cleanupProjectDir, 'build.gradle'), 'task("noop") {}');
await (0, gradle_1.provisionAndMaybeExecute)('current', cleanupProjectDir, [ const executable = await provisioner.provisionGradle('current');
await core.group('Executing Gradle to clean up caches', async () => {
core.info(`Cleaning up caches last used before ${cleanTimestamp}`);
await this.executeCleanupBuild(executable, cleanupProjectDir);
});
}
async executeCleanupBuild(executable, cleanupProjectDir) {
const args = [
'-g', '-g',
this.gradleUserHome, this.gradleUserHome,
'-I', '-I',
@ -143263,7 +143270,12 @@ class CacheCleaner {
'--build-cache', '--build-cache',
'-DGITHUB_DEPENDENCY_GRAPH_ENABLED=false', '-DGITHUB_DEPENDENCY_GRAPH_ENABLED=false',
'noop' 'noop'
]); ];
const result = await exec.getExecOutput(executable, args, {
cwd: cleanupProjectDir,
silent: true
});
core.info(result.stdout);
} }
} }
exports.CacheCleaner = CacheCleaner; exports.CacheCleaner = CacheCleaner;
@ -143852,7 +143864,9 @@ async function save(userHome, gradleUserHome, cacheListener, daemonController, b
cacheListener.setReadOnly(); cacheListener.setReadOnly();
return; return;
} }
await daemonController.stopAllDaemons(); await core.group('Stopping Gradle daemons', async () => {
await daemonController.stopAllDaemons();
});
if (cacheConfig.isCacheCleanupEnabled()) { if (cacheConfig.isCacheCleanupEnabled()) {
if (buildResults.anyConfigCacheHit()) { if (buildResults.anyConfigCacheHit()) {
core.info('Not performing cache-cleanup due to config-cache reuse'); core.info('Not performing cache-cleanup due to config-cache reuse');
@ -143873,7 +143887,6 @@ async function save(userHome, gradleUserHome, cacheListener, daemonController, b
} }
exports.save = save; exports.save = save;
async function performCacheCleanup(gradleUserHome) { async function performCacheCleanup(gradleUserHome) {
core.info('Forcing cache cleanup.');
const cacheCleaner = new cache_cleaner_1.CacheCleaner(gradleUserHome, process.env['RUNNER_TEMP']); const cacheCleaner = new cache_cleaner_1.CacheCleaner(gradleUserHome, process.env['RUNNER_TEMP']);
try { try {
await cacheCleaner.forceCleanup(); await cacheCleaner.forceCleanup();
@ -144918,7 +144931,6 @@ class DaemonController {
this.gradleHomes = buildResults.uniqueGradleHomes(); this.gradleHomes = buildResults.uniqueGradleHomes();
} }
async stopAllDaemons() { async stopAllDaemons() {
core.info('Stopping all Gradle daemons before saving Gradle User Home state');
const executions = []; const executions = [];
const args = ['--stop']; const args = ['--stop'];
for (const gradleHome of this.gradleHomes) { for (const gradleHome of this.gradleHomes) {
@ -145631,61 +145643,6 @@ function handlePostActionError(error) {
exports.handlePostActionError = handlePostActionError; exports.handlePostActionError = handlePostActionError;
/***/ }),
/***/ 94475:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.provisionAndMaybeExecute = void 0;
const core = __importStar(__nccwpck_require__(42186));
const exec = __importStar(__nccwpck_require__(71514));
const provisioner = __importStar(__nccwpck_require__(14042));
const gradlew = __importStar(__nccwpck_require__(46807));
async function provisionAndMaybeExecute(gradleVersion, buildRootDirectory, args) {
const executable = await provisioner.provisionGradle(gradleVersion);
if (args.length > 0) {
await executeGradleBuild(executable, buildRootDirectory, args);
}
}
exports.provisionAndMaybeExecute = provisionAndMaybeExecute;
async function executeGradleBuild(executable, root, args) {
const toExecute = executable ?? gradlew.gradleWrapperScript(root);
const status = await exec.exec(toExecute, args, {
cwd: root,
ignoreReturnCode: true
});
if (status !== 0) {
core.setFailed(`Gradle build failed: see console output for details`);
}
}
/***/ }), /***/ }),
/***/ 46807: /***/ 46807:

File diff suppressed because one or more lines are too long

View file

@ -143206,9 +143206,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CacheCleaner = void 0; exports.CacheCleaner = void 0;
const core = __importStar(__nccwpck_require__(42186)); const core = __importStar(__nccwpck_require__(42186));
const exec = __importStar(__nccwpck_require__(71514));
const fs_1 = __importDefault(__nccwpck_require__(57147)); const fs_1 = __importDefault(__nccwpck_require__(57147));
const path_1 = __importDefault(__nccwpck_require__(71017)); const path_1 = __importDefault(__nccwpck_require__(71017));
const gradle_1 = __nccwpck_require__(94475); const provisioner = __importStar(__nccwpck_require__(14042));
class CacheCleaner { class CacheCleaner {
constructor(gradleUserHome, tmpDir) { constructor(gradleUserHome, tmpDir) {
this.gradleUserHome = gradleUserHome; this.gradleUserHome = gradleUserHome;
@ -143224,7 +143225,6 @@ class CacheCleaner {
await this.forceCleanupFilesOlderThan(cleanTimestamp); await this.forceCleanupFilesOlderThan(cleanTimestamp);
} }
async forceCleanupFilesOlderThan(cleanTimestamp) { async forceCleanupFilesOlderThan(cleanTimestamp) {
core.info(`Cleaning up caches before ${cleanTimestamp}`);
const cleanupProjectDir = path_1.default.resolve(this.tmpDir, 'dummy-cleanup-project'); const cleanupProjectDir = path_1.default.resolve(this.tmpDir, 'dummy-cleanup-project');
fs_1.default.mkdirSync(cleanupProjectDir, { recursive: true }); fs_1.default.mkdirSync(cleanupProjectDir, { recursive: true });
fs_1.default.writeFileSync(path_1.default.resolve(cleanupProjectDir, 'settings.gradle'), 'rootProject.name = "dummy-cleanup-project"'); fs_1.default.writeFileSync(path_1.default.resolve(cleanupProjectDir, 'settings.gradle'), 'rootProject.name = "dummy-cleanup-project"');
@ -143244,7 +143244,14 @@ class CacheCleaner {
} }
`); `);
fs_1.default.writeFileSync(path_1.default.resolve(cleanupProjectDir, 'build.gradle'), 'task("noop") {}'); fs_1.default.writeFileSync(path_1.default.resolve(cleanupProjectDir, 'build.gradle'), 'task("noop") {}');
await (0, gradle_1.provisionAndMaybeExecute)('current', cleanupProjectDir, [ const executable = await provisioner.provisionGradle('current');
await core.group('Executing Gradle to clean up caches', async () => {
core.info(`Cleaning up caches last used before ${cleanTimestamp}`);
await this.executeCleanupBuild(executable, cleanupProjectDir);
});
}
async executeCleanupBuild(executable, cleanupProjectDir) {
const args = [
'-g', '-g',
this.gradleUserHome, this.gradleUserHome,
'-I', '-I',
@ -143255,7 +143262,12 @@ class CacheCleaner {
'--build-cache', '--build-cache',
'-DGITHUB_DEPENDENCY_GRAPH_ENABLED=false', '-DGITHUB_DEPENDENCY_GRAPH_ENABLED=false',
'noop' 'noop'
]); ];
const result = await exec.getExecOutput(executable, args, {
cwd: cleanupProjectDir,
silent: true
});
core.info(result.stdout);
} }
} }
exports.CacheCleaner = CacheCleaner; exports.CacheCleaner = CacheCleaner;
@ -143844,7 +143856,9 @@ async function save(userHome, gradleUserHome, cacheListener, daemonController, b
cacheListener.setReadOnly(); cacheListener.setReadOnly();
return; return;
} }
await daemonController.stopAllDaemons(); await core.group('Stopping Gradle daemons', async () => {
await daemonController.stopAllDaemons();
});
if (cacheConfig.isCacheCleanupEnabled()) { if (cacheConfig.isCacheCleanupEnabled()) {
if (buildResults.anyConfigCacheHit()) { if (buildResults.anyConfigCacheHit()) {
core.info('Not performing cache-cleanup due to config-cache reuse'); core.info('Not performing cache-cleanup due to config-cache reuse');
@ -143865,7 +143879,6 @@ async function save(userHome, gradleUserHome, cacheListener, daemonController, b
} }
exports.save = save; exports.save = save;
async function performCacheCleanup(gradleUserHome) { async function performCacheCleanup(gradleUserHome) {
core.info('Forcing cache cleanup.');
const cacheCleaner = new cache_cleaner_1.CacheCleaner(gradleUserHome, process.env['RUNNER_TEMP']); const cacheCleaner = new cache_cleaner_1.CacheCleaner(gradleUserHome, process.env['RUNNER_TEMP']);
try { try {
await cacheCleaner.forceCleanup(); await cacheCleaner.forceCleanup();
@ -144910,7 +144923,6 @@ class DaemonController {
this.gradleHomes = buildResults.uniqueGradleHomes(); this.gradleHomes = buildResults.uniqueGradleHomes();
} }
async stopAllDaemons() { async stopAllDaemons() {
core.info('Stopping all Gradle daemons before saving Gradle User Home state');
const executions = []; const executions = [];
const args = ['--stop']; const args = ['--stop'];
for (const gradleHome of this.gradleHomes) { for (const gradleHome of this.gradleHomes) {
@ -145623,61 +145635,6 @@ function handlePostActionError(error) {
exports.handlePostActionError = handlePostActionError; exports.handlePostActionError = handlePostActionError;
/***/ }),
/***/ 94475:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.provisionAndMaybeExecute = void 0;
const core = __importStar(__nccwpck_require__(42186));
const exec = __importStar(__nccwpck_require__(71514));
const provisioner = __importStar(__nccwpck_require__(14042));
const gradlew = __importStar(__nccwpck_require__(46807));
async function provisionAndMaybeExecute(gradleVersion, buildRootDirectory, args) {
const executable = await provisioner.provisionGradle(gradleVersion);
if (args.length > 0) {
await executeGradleBuild(executable, buildRootDirectory, args);
}
}
exports.provisionAndMaybeExecute = provisionAndMaybeExecute;
async function executeGradleBuild(executable, root, args) {
const toExecute = executable ?? gradlew.gradleWrapperScript(root);
const status = await exec.exec(toExecute, args, {
cwd: root,
ignoreReturnCode: true
});
if (status !== 0) {
core.setFailed(`Gradle build failed: see console output for details`);
}
}
/***/ }), /***/ }),
/***/ 46807: /***/ 46807:

File diff suppressed because one or more lines are too long