mirror of
https://github.com/gradle/gradle-build-action.git
synced 2025-10-19 22:38:58 +08:00
Compare commits
18 Commits
v2.3.0-bet
...
v2.3.0
Author | SHA1 | Date | |
---|---|---|---|
|
356abb47e7 | ||
|
fc9e8feb61 | ||
|
0e4b100458 | ||
|
82bc72e1e7 | ||
|
8be955ee80 | ||
|
531cc21aeb | ||
|
164712adb1 | ||
|
535b494721 | ||
|
d6110ecac2 | ||
|
cc60593845 | ||
|
fb549a8417 | ||
|
c64fe31590 | ||
|
6e56b59601 | ||
|
c77676cc69 | ||
|
f39ea084f9 | ||
|
27a2f232f6 | ||
|
b4c3d51488 | ||
|
99ec710825 |
6
.github/dependabot.yml
vendored
6
.github/dependabot.yml
vendored
@@ -49,3 +49,9 @@ updates:
|
||||
- gradle-plugin-portal
|
||||
schedule:
|
||||
interval: "daily"
|
||||
- package-ecosystem: "gradle"
|
||||
directory: "test/init-scripts"
|
||||
registries:
|
||||
- gradle-plugin-portal
|
||||
schedule:
|
||||
interval: "daily"
|
||||
|
1
.github/workflows/ci-full-check.yml
vendored
1
.github/workflows/ci-full-check.yml
vendored
@@ -20,7 +20,6 @@ jobs:
|
||||
cache-key-prefix: ${{github.run_number}}-
|
||||
|
||||
cache-cleanup:
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/integ-test-cache-cleanup.yml
|
||||
with:
|
||||
cache-key-prefix: ${{github.run_number}}-
|
||||
|
@@ -34,7 +34,7 @@ jobs:
|
||||
cache-read-only: false # For testing, allow writing cache entries on non-default branches
|
||||
- name: Build with 3.1
|
||||
working-directory: test/jest/resources/cache-cleanup
|
||||
run: gradle --no-daemon --build-cache -Dcommons-math3.version=3.1 build
|
||||
run: gradle --no-daemon --build-cache -Dcommons_math3_version="3.1" build
|
||||
|
||||
# Second build will use the cache from the first build, but cleanup should remove unused artifacts
|
||||
assemble-build:
|
||||
@@ -55,7 +55,7 @@ jobs:
|
||||
gradle-home-cache-cleanup: true
|
||||
- name: Build with 3.1.1
|
||||
working-directory: test/jest/resources/cache-cleanup
|
||||
run: gradle --no-daemon --build-cache -Dcommons-math3.version=3.1.1 build
|
||||
run: gradle --no-daemon --build-cache -Dcommons_math3_version="3.1.1" build
|
||||
|
||||
check-clean-cache:
|
||||
needs: assemble-build
|
||||
@@ -75,6 +75,7 @@ jobs:
|
||||
- name: Report Gradle User Home
|
||||
run: du -hc ~/.gradle/caches/modules-2
|
||||
- name: Verify cleaned cache
|
||||
shell: bash
|
||||
run: |
|
||||
if [ ! -e ~/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-math3/3.1.1 ]; then
|
||||
echo "::error ::Should find commons-math3 3.1.1 in cache"
|
||||
|
36
dist/main/index.js
vendored
36
dist/main/index.js
vendored
@@ -65860,12 +65860,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __asyncValues = (this && this.__asyncValues) || function (o) {
|
||||
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
||||
var m = o[Symbol.asyncIterator], i;
|
||||
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
||||
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
||||
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.CacheCleaner = void 0;
|
||||
const core = __importStar(__nccwpck_require__(2186));
|
||||
const exec = __importStar(__nccwpck_require__(1514));
|
||||
const glob = __importStar(__nccwpck_require__(8090));
|
||||
const fs_1 = __importDefault(__nccwpck_require__(7147));
|
||||
const path_1 = __importDefault(__nccwpck_require__(1017));
|
||||
class CacheCleaner {
|
||||
@@ -65896,12 +65905,35 @@ class CacheCleaner {
|
||||
}
|
||||
ageAllFiles(fileName = '*') {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
yield exec.exec('find', [this.gradleUserHome, '-name', fileName, '-exec', 'touch', '-m', '-d', '1970-01-01', '{}', '+'], {});
|
||||
core.debug(`Aging all files in Gradle User Homee with name ${fileName}`);
|
||||
yield this.setUtimes(`${this.gradleUserHome}/**/${fileName}`, new Date(0));
|
||||
});
|
||||
}
|
||||
touchAllFiles(fileName = '*') {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
yield exec.exec('find', [this.gradleUserHome, '-name', fileName, '-exec', 'touch', '-m', '{}', '+'], {});
|
||||
core.debug(`Touching all files in Gradle User Home with name ${fileName}`);
|
||||
yield this.setUtimes(`${this.gradleUserHome}/**/${fileName}`, new Date());
|
||||
});
|
||||
}
|
||||
setUtimes(pattern, timestamp) {
|
||||
var e_1, _a;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const globber = yield glob.create(pattern, {
|
||||
implicitDescendants: false
|
||||
});
|
||||
try {
|
||||
for (var _b = __asyncValues(globber.globGenerator()), _c; _c = yield _b.next(), !_c.done;) {
|
||||
const file = _c.value;
|
||||
fs_1.default.utimesSync(file, timestamp, timestamp);
|
||||
}
|
||||
}
|
||||
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
|
||||
}
|
||||
finally { if (e_1) throw e_1.error; }
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
2
dist/main/index.js.map
vendored
2
dist/main/index.js.map
vendored
File diff suppressed because one or more lines are too long
36
dist/post/index.js
vendored
36
dist/post/index.js
vendored
@@ -64911,12 +64911,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __asyncValues = (this && this.__asyncValues) || function (o) {
|
||||
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
||||
var m = o[Symbol.asyncIterator], i;
|
||||
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
||||
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
||||
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.CacheCleaner = void 0;
|
||||
const core = __importStar(__nccwpck_require__(2186));
|
||||
const exec = __importStar(__nccwpck_require__(1514));
|
||||
const glob = __importStar(__nccwpck_require__(8090));
|
||||
const fs_1 = __importDefault(__nccwpck_require__(7147));
|
||||
const path_1 = __importDefault(__nccwpck_require__(1017));
|
||||
class CacheCleaner {
|
||||
@@ -64947,12 +64956,35 @@ class CacheCleaner {
|
||||
}
|
||||
ageAllFiles(fileName = '*') {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
yield exec.exec('find', [this.gradleUserHome, '-name', fileName, '-exec', 'touch', '-m', '-d', '1970-01-01', '{}', '+'], {});
|
||||
core.debug(`Aging all files in Gradle User Homee with name ${fileName}`);
|
||||
yield this.setUtimes(`${this.gradleUserHome}/**/${fileName}`, new Date(0));
|
||||
});
|
||||
}
|
||||
touchAllFiles(fileName = '*') {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
yield exec.exec('find', [this.gradleUserHome, '-name', fileName, '-exec', 'touch', '-m', '{}', '+'], {});
|
||||
core.debug(`Touching all files in Gradle User Home with name ${fileName}`);
|
||||
yield this.setUtimes(`${this.gradleUserHome}/**/${fileName}`, new Date());
|
||||
});
|
||||
}
|
||||
setUtimes(pattern, timestamp) {
|
||||
var e_1, _a;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const globber = yield glob.create(pattern, {
|
||||
implicitDescendants: false
|
||||
});
|
||||
try {
|
||||
for (var _b = __asyncValues(globber.globGenerator()), _c; _c = yield _b.next(), !_c.done;) {
|
||||
const file = _c.value;
|
||||
fs_1.default.utimesSync(file, timestamp, timestamp);
|
||||
}
|
||||
}
|
||||
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
|
||||
}
|
||||
finally { if (e_1) throw e_1.error; }
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
2
dist/post/index.js.map
vendored
2
dist/post/index.js.map
vendored
File diff suppressed because one or more lines are too long
122
package-lock.json
generated
122
package-lock.json
generated
@@ -23,17 +23,17 @@
|
||||
"@types/jest": "28.1.7",
|
||||
"@types/node": "16.11.21",
|
||||
"@types/unzipper": "0.10.5",
|
||||
"@typescript-eslint/parser": "5.33.1",
|
||||
"@typescript-eslint/parser": "5.35.1",
|
||||
"@vercel/ncc": "0.34.0",
|
||||
"eslint": "8.22.0",
|
||||
"eslint-plugin-github": "4.3.7",
|
||||
"eslint-plugin-jest": "26.8.3",
|
||||
"eslint-plugin-jest": "26.8.7",
|
||||
"jest": "28.1.3",
|
||||
"js-yaml": "4.1.0",
|
||||
"patch-package": "6.4.7",
|
||||
"prettier": "2.7.1",
|
||||
"ts-jest": "28.0.8",
|
||||
"typescript": "4.7.4"
|
||||
"typescript": "4.8.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/cache": {
|
||||
@@ -1815,14 +1815,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser": {
|
||||
"version": "5.33.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.33.1.tgz",
|
||||
"integrity": "sha512-IgLLtW7FOzoDlmaMoXdxG8HOCByTBXrB1V2ZQYSEV1ggMmJfAkMWTwUjjzagS6OkfpySyhKFkBw7A9jYmcHpZA==",
|
||||
"version": "5.35.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.35.1.tgz",
|
||||
"integrity": "sha512-XL2TBTSrh3yWAsMYpKseBYTVpvudNf69rPOWXWVBI08My2JVT5jR66eTt4IgQFHA/giiKJW5dUD4x/ZviCKyGg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": "5.33.1",
|
||||
"@typescript-eslint/types": "5.33.1",
|
||||
"@typescript-eslint/typescript-estree": "5.33.1",
|
||||
"@typescript-eslint/scope-manager": "5.35.1",
|
||||
"@typescript-eslint/types": "5.35.1",
|
||||
"@typescript-eslint/typescript-estree": "5.35.1",
|
||||
"debug": "^4.3.4"
|
||||
},
|
||||
"engines": {
|
||||
@@ -1842,13 +1842,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": {
|
||||
"version": "5.33.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.33.1.tgz",
|
||||
"integrity": "sha512-8ibcZSqy4c5m69QpzJn8XQq9NnqAToC8OdH/W6IXPXv83vRyEDPYLdjAlUx8h/rbusq6MkW4YdQzURGOqsn3CA==",
|
||||
"version": "5.35.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.35.1.tgz",
|
||||
"integrity": "sha512-kCYRSAzIW9ByEIzmzGHE50NGAvAP3wFTaZevgWva7GpquDyFPFcmvVkFJGWJJktg/hLwmys/FZwqM9EKr2u24Q==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "5.33.1",
|
||||
"@typescript-eslint/visitor-keys": "5.33.1"
|
||||
"@typescript-eslint/types": "5.35.1",
|
||||
"@typescript-eslint/visitor-keys": "5.35.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
@@ -1859,9 +1859,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": {
|
||||
"version": "5.33.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.33.1.tgz",
|
||||
"integrity": "sha512-7K6MoQPQh6WVEkMrMW5QOA5FO+BOwzHSNd0j3+BlBwd6vtzfZceJ8xJ7Um2XDi/O3umS8/qDX6jdy2i7CijkwQ==",
|
||||
"version": "5.35.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.35.1.tgz",
|
||||
"integrity": "sha512-FDaujtsH07VHzG0gQ6NDkVVhi1+rhq0qEvzHdJAQjysN+LHDCKDKCBRlZFFE0ec0jKxiv0hN63SNfExy0KrbQQ==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
@@ -1872,13 +1872,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": {
|
||||
"version": "5.33.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.33.1.tgz",
|
||||
"integrity": "sha512-JOAzJ4pJ+tHzA2pgsWQi4804XisPHOtbvwUyqsuuq8+y5B5GMZs7lI1xDWs6V2d7gE/Ez5bTGojSK12+IIPtXA==",
|
||||
"version": "5.35.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.35.1.tgz",
|
||||
"integrity": "sha512-JUqE1+VRTGyoXlDWWjm6MdfpBYVq+hixytrv1oyjYIBEOZhBCwtpp5ZSvBt4wIA1MKWlnaC2UXl2XmYGC3BoQA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "5.33.1",
|
||||
"@typescript-eslint/visitor-keys": "5.33.1",
|
||||
"@typescript-eslint/types": "5.35.1",
|
||||
"@typescript-eslint/visitor-keys": "5.35.1",
|
||||
"debug": "^4.3.4",
|
||||
"globby": "^11.1.0",
|
||||
"is-glob": "^4.0.3",
|
||||
@@ -1899,12 +1899,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": {
|
||||
"version": "5.33.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.33.1.tgz",
|
||||
"integrity": "sha512-nwIxOK8Z2MPWltLKMLOEZwmfBZReqUdbEoHQXeCpa+sRVARe5twpJGHCB4dk9903Yaf0nMAlGbQfaAH92F60eg==",
|
||||
"version": "5.35.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.35.1.tgz",
|
||||
"integrity": "sha512-cEB1DvBVo1bxbW/S5axbGPE6b7FIMAbo3w+AGq6zNDA7+NYJOIkKj/sInfTv4edxd4PxJSgdN4t6/pbvgA+n5g==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "5.33.1",
|
||||
"@typescript-eslint/types": "5.35.1",
|
||||
"eslint-visitor-keys": "^3.3.0"
|
||||
},
|
||||
"engines": {
|
||||
@@ -3139,9 +3139,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/eslint-plugin-jest": {
|
||||
"version": "26.8.3",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-26.8.3.tgz",
|
||||
"integrity": "sha512-2roWu1MkEiihQ/qEszPPoaoqVI1x2D8Jtadk5AmoXTdEeNVPMu01Dtz7jIuTOAmdW3L+tSkPZOtEtQroYJDt0A==",
|
||||
"version": "26.8.7",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-26.8.7.tgz",
|
||||
"integrity": "sha512-nJJVv3VY6ZZvJGDMC8h1jN/TIGT4We1JkNn1lvstPURicr/eZPVnlFULQ4W2qL9ByCuCr1hPmlBOc2aZ1ktw4Q==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/utils": "^5.10.0"
|
||||
@@ -6701,9 +6701,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "4.7.4",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz",
|
||||
"integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==",
|
||||
"version": "4.8.2",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.2.tgz",
|
||||
"integrity": "sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
@@ -8410,41 +8410,41 @@
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/parser": {
|
||||
"version": "5.33.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.33.1.tgz",
|
||||
"integrity": "sha512-IgLLtW7FOzoDlmaMoXdxG8HOCByTBXrB1V2ZQYSEV1ggMmJfAkMWTwUjjzagS6OkfpySyhKFkBw7A9jYmcHpZA==",
|
||||
"version": "5.35.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.35.1.tgz",
|
||||
"integrity": "sha512-XL2TBTSrh3yWAsMYpKseBYTVpvudNf69rPOWXWVBI08My2JVT5jR66eTt4IgQFHA/giiKJW5dUD4x/ZviCKyGg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/scope-manager": "5.33.1",
|
||||
"@typescript-eslint/types": "5.33.1",
|
||||
"@typescript-eslint/typescript-estree": "5.33.1",
|
||||
"@typescript-eslint/scope-manager": "5.35.1",
|
||||
"@typescript-eslint/types": "5.35.1",
|
||||
"@typescript-eslint/typescript-estree": "5.35.1",
|
||||
"debug": "^4.3.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": {
|
||||
"version": "5.33.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.33.1.tgz",
|
||||
"integrity": "sha512-8ibcZSqy4c5m69QpzJn8XQq9NnqAToC8OdH/W6IXPXv83vRyEDPYLdjAlUx8h/rbusq6MkW4YdQzURGOqsn3CA==",
|
||||
"version": "5.35.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.35.1.tgz",
|
||||
"integrity": "sha512-kCYRSAzIW9ByEIzmzGHE50NGAvAP3wFTaZevgWva7GpquDyFPFcmvVkFJGWJJktg/hLwmys/FZwqM9EKr2u24Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/types": "5.33.1",
|
||||
"@typescript-eslint/visitor-keys": "5.33.1"
|
||||
"@typescript-eslint/types": "5.35.1",
|
||||
"@typescript-eslint/visitor-keys": "5.35.1"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/types": {
|
||||
"version": "5.33.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.33.1.tgz",
|
||||
"integrity": "sha512-7K6MoQPQh6WVEkMrMW5QOA5FO+BOwzHSNd0j3+BlBwd6vtzfZceJ8xJ7Um2XDi/O3umS8/qDX6jdy2i7CijkwQ==",
|
||||
"version": "5.35.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.35.1.tgz",
|
||||
"integrity": "sha512-FDaujtsH07VHzG0gQ6NDkVVhi1+rhq0qEvzHdJAQjysN+LHDCKDKCBRlZFFE0ec0jKxiv0hN63SNfExy0KrbQQ==",
|
||||
"dev": true
|
||||
},
|
||||
"@typescript-eslint/typescript-estree": {
|
||||
"version": "5.33.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.33.1.tgz",
|
||||
"integrity": "sha512-JOAzJ4pJ+tHzA2pgsWQi4804XisPHOtbvwUyqsuuq8+y5B5GMZs7lI1xDWs6V2d7gE/Ez5bTGojSK12+IIPtXA==",
|
||||
"version": "5.35.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.35.1.tgz",
|
||||
"integrity": "sha512-JUqE1+VRTGyoXlDWWjm6MdfpBYVq+hixytrv1oyjYIBEOZhBCwtpp5ZSvBt4wIA1MKWlnaC2UXl2XmYGC3BoQA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/types": "5.33.1",
|
||||
"@typescript-eslint/visitor-keys": "5.33.1",
|
||||
"@typescript-eslint/types": "5.35.1",
|
||||
"@typescript-eslint/visitor-keys": "5.35.1",
|
||||
"debug": "^4.3.4",
|
||||
"globby": "^11.1.0",
|
||||
"is-glob": "^4.0.3",
|
||||
@@ -8453,12 +8453,12 @@
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/visitor-keys": {
|
||||
"version": "5.33.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.33.1.tgz",
|
||||
"integrity": "sha512-nwIxOK8Z2MPWltLKMLOEZwmfBZReqUdbEoHQXeCpa+sRVARe5twpJGHCB4dk9903Yaf0nMAlGbQfaAH92F60eg==",
|
||||
"version": "5.35.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.35.1.tgz",
|
||||
"integrity": "sha512-cEB1DvBVo1bxbW/S5axbGPE6b7FIMAbo3w+AGq6zNDA7+NYJOIkKj/sInfTv4edxd4PxJSgdN4t6/pbvgA+n5g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/types": "5.33.1",
|
||||
"@typescript-eslint/types": "5.35.1",
|
||||
"eslint-visitor-keys": "^3.3.0"
|
||||
}
|
||||
},
|
||||
@@ -9414,9 +9414,9 @@
|
||||
}
|
||||
},
|
||||
"eslint-plugin-jest": {
|
||||
"version": "26.8.3",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-26.8.3.tgz",
|
||||
"integrity": "sha512-2roWu1MkEiihQ/qEszPPoaoqVI1x2D8Jtadk5AmoXTdEeNVPMu01Dtz7jIuTOAmdW3L+tSkPZOtEtQroYJDt0A==",
|
||||
"version": "26.8.7",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-26.8.7.tgz",
|
||||
"integrity": "sha512-nJJVv3VY6ZZvJGDMC8h1jN/TIGT4We1JkNn1lvstPURicr/eZPVnlFULQ4W2qL9ByCuCr1hPmlBOc2aZ1ktw4Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/utils": "^5.10.0"
|
||||
@@ -11959,9 +11959,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"typescript": {
|
||||
"version": "4.7.4",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz",
|
||||
"integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==",
|
||||
"version": "4.8.2",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.2.tgz",
|
||||
"integrity": "sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==",
|
||||
"dev": true
|
||||
},
|
||||
"unbox-primitive": {
|
||||
|
@@ -39,16 +39,16 @@
|
||||
"@types/jest": "28.1.7",
|
||||
"@types/node": "16.11.21",
|
||||
"@types/unzipper": "0.10.5",
|
||||
"@typescript-eslint/parser": "5.33.1",
|
||||
"@typescript-eslint/parser": "5.35.1",
|
||||
"@vercel/ncc": "0.34.0",
|
||||
"eslint": "8.22.0",
|
||||
"eslint-plugin-github": "4.3.7",
|
||||
"eslint-plugin-jest": "26.8.3",
|
||||
"eslint-plugin-jest": "26.8.7",
|
||||
"jest": "28.1.3",
|
||||
"js-yaml": "4.1.0",
|
||||
"patch-package": "6.4.7",
|
||||
"prettier": "2.7.1",
|
||||
"ts-jest": "28.0.8",
|
||||
"typescript": "4.7.4"
|
||||
"typescript": "4.8.2"
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,6 @@
|
||||
import * as core from '@actions/core'
|
||||
import * as exec from '@actions/exec'
|
||||
import * as glob from '@actions/glob'
|
||||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
|
||||
@@ -46,14 +48,21 @@ export class CacheCleaner {
|
||||
}
|
||||
|
||||
private async ageAllFiles(fileName = '*'): Promise<void> {
|
||||
await exec.exec(
|
||||
'find',
|
||||
[this.gradleUserHome, '-name', fileName, '-exec', 'touch', '-m', '-d', '1970-01-01', '{}', '+'],
|
||||
{}
|
||||
)
|
||||
core.debug(`Aging all files in Gradle User Homee with name ${fileName}`)
|
||||
await this.setUtimes(`${this.gradleUserHome}/**/${fileName}`, new Date(0))
|
||||
}
|
||||
|
||||
private async touchAllFiles(fileName = '*'): Promise<void> {
|
||||
await exec.exec('find', [this.gradleUserHome, '-name', fileName, '-exec', 'touch', '-m', '{}', '+'], {})
|
||||
core.debug(`Touching all files in Gradle User Home with name ${fileName}`)
|
||||
await this.setUtimes(`${this.gradleUserHome}/**/${fileName}`, new Date())
|
||||
}
|
||||
|
||||
private async setUtimes(pattern: string, timestamp: Date): Promise<void> {
|
||||
const globber = await glob.create(pattern, {
|
||||
implicitDescendants: false
|
||||
})
|
||||
for await (const file of globber.globGenerator()) {
|
||||
fs.utimesSync(file, timestamp, timestamp)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -32,7 +32,8 @@ if (isTopLevelBuild) {
|
||||
if (gradle.rootProject.pluginManager.hasPlugin("com.gradle.build-scan")) {
|
||||
captureUsingBuildScanPublished(gradle.rootProject.extensions["buildScan"], gradle.rootProject, invocationId)
|
||||
}
|
||||
// We need to capture in buildFinished in case the plugin is applied but no build scan is published
|
||||
// Always attempt to capture in buildFinished in case the plugin is applied but no build scan is published
|
||||
// The `buildScanPublished` results will NOT be overwritten by this call
|
||||
captureUsingBuildFinished(gradle, invocationId)
|
||||
}
|
||||
}
|
||||
|
@@ -1 +1,14 @@
|
||||
plugins {
|
||||
id "com.gradle.enterprise" version "3.11.1"
|
||||
id "com.gradle.common-custom-user-data-gradle-plugin" version "1.8"
|
||||
}
|
||||
|
||||
gradleEnterprise {
|
||||
buildScan {
|
||||
termsOfServiceUrl = "https://gradle.com/terms-of-service"
|
||||
termsOfServiceAgree = "yes"
|
||||
publishAlways()
|
||||
uploadInBackground = false
|
||||
}
|
||||
}
|
||||
rootProject.name = 'test-init-scripts'
|
||||
|
@@ -63,17 +63,17 @@ test('will cleanup unused gradle versions', async () => {
|
||||
})
|
||||
|
||||
async function runGradleBuild(projectRoot: string, args: string, version: string = '3.1'): Promise<void> {
|
||||
const status31 = await exec.exec(`gradle -g HOME --no-daemon --build-cache -Dcommons-math3.version=${version} ${args}`, [], {
|
||||
const status31 = await exec.exec(`gradle -g HOME --no-daemon --build-cache -Dcommons_math3_version="${version}" ${args}`, [], {
|
||||
cwd: projectRoot
|
||||
})
|
||||
console.log(`Gradle User Home initialized with commons-math3.version=${version} ${args}`)
|
||||
console.log(`Gradle User Home initialized with commons_math3_version=${version} ${args}`)
|
||||
}
|
||||
|
||||
async function runGradleWrapperBuild(projectRoot: string, args: string, version: string = '3.1'): Promise<void> {
|
||||
const status31 = await exec.exec(`./gradlew -g HOME --no-daemon --build-cache -Dcommons-math3.version=${version} ${args}`, [], {
|
||||
const status31 = await exec.exec(`./gradlew -g HOME --no-daemon --build-cache -Dcommons_math3_version="${version}" ${args}`, [], {
|
||||
cwd: projectRoot
|
||||
})
|
||||
console.log(`Gradle User Home initialized with commons-math3.version=${version} ${args}`)
|
||||
console.log(`Gradle User Home initialized with commons_math3_version="${version}" ${args}`)
|
||||
}
|
||||
|
||||
function prepareTestProject(): string {
|
||||
|
@@ -7,5 +7,5 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api "org.apache.commons:commons-math3:${System.properties['commons-math3.version']}"
|
||||
api "org.apache.commons:commons-math3:${System.properties['commons_math3_version']}"
|
||||
}
|
||||
|
Reference in New Issue
Block a user