mirror of
https://github.com/gradle/gradle-build-action.git
synced 2025-05-01 20:38:34 +02:00
parent
124cb765ee
commit
8cade330d4
5 changed files with 49 additions and 22 deletions
20
dist/main/index.js
vendored
20
dist/main/index.js
vendored
|
@ -74827,6 +74827,13 @@ function addToPath(executable) {
|
|||
});
|
||||
}
|
||||
function installGradle(version) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const versionInfo = yield resolveGradleVersion(version);
|
||||
core.setOutput('gradle-version', versionInfo.version);
|
||||
return installGradleVersion(versionInfo);
|
||||
});
|
||||
}
|
||||
function resolveGradleVersion(version) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
switch (version) {
|
||||
case 'current':
|
||||
|
@ -74847,15 +74854,14 @@ function installGradle(version) {
|
|||
}
|
||||
function gradleCurrent() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const versionInfo = yield gradleVersionDeclaration(`${gradleVersionsBaseUrl}/current`);
|
||||
return installGradleVersion(versionInfo);
|
||||
return yield gradleVersionDeclaration(`${gradleVersionsBaseUrl}/current`);
|
||||
});
|
||||
}
|
||||
function gradleReleaseCandidate() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const versionInfo = yield gradleVersionDeclaration(`${gradleVersionsBaseUrl}/release-candidate`);
|
||||
if (versionInfo && versionInfo.version && versionInfo.downloadUrl) {
|
||||
return installGradleVersion(versionInfo);
|
||||
return versionInfo;
|
||||
}
|
||||
core.info('No current release-candidate found, will fallback to current');
|
||||
return gradleCurrent();
|
||||
|
@ -74863,14 +74869,12 @@ function gradleReleaseCandidate() {
|
|||
}
|
||||
function gradleNightly() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const versionInfo = yield gradleVersionDeclaration(`${gradleVersionsBaseUrl}/nightly`);
|
||||
return installGradleVersion(versionInfo);
|
||||
return yield gradleVersionDeclaration(`${gradleVersionsBaseUrl}/nightly`);
|
||||
});
|
||||
}
|
||||
function gradleReleaseNightly() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const versionInfo = yield gradleVersionDeclaration(`${gradleVersionsBaseUrl}/release-nightly`);
|
||||
return installGradleVersion(versionInfo);
|
||||
return yield gradleVersionDeclaration(`${gradleVersionsBaseUrl}/release-nightly`);
|
||||
});
|
||||
}
|
||||
function gradle(version) {
|
||||
|
@ -74879,7 +74883,7 @@ function gradle(version) {
|
|||
if (!versionInfo) {
|
||||
throw new Error(`Gradle version ${version} does not exists`);
|
||||
}
|
||||
return installGradleVersion(versionInfo);
|
||||
return versionInfo;
|
||||
});
|
||||
}
|
||||
function gradleVersionDeclaration(url) {
|
||||
|
|
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
Loading…
Add table
Add a link
Reference in a new issue