mirror of
https://github.com/gradle/actions
synced 2024-11-23 18:02:13 +00:00
build
This commit is contained in:
parent
580b26a94c
commit
064f85c156
1 changed files with 6 additions and 4 deletions
10
lib/main.js
10
lib/main.js
|
@ -45,22 +45,24 @@ function resolveGradleExecutable(baseDirectory) {
|
|||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const gradleVersion = inputOrNull("gradle-version");
|
||||
if (gradleVersion != null) {
|
||||
return provision.gradleVersion(gradleVersion);
|
||||
return path.resolve(yield provision.gradleVersion(gradleVersion));
|
||||
}
|
||||
const gradleExecutable = inputOrNull("gradle-executable");
|
||||
if (gradleExecutable != null) {
|
||||
return path.join(baseDirectory, gradleExecutable);
|
||||
return path.resolve(baseDirectory, gradleExecutable);
|
||||
}
|
||||
const wrapperDirectory = inputOrNull("wrapper-directory");
|
||||
const executableDirectory = wrapperDirectory != null
|
||||
? path.join(baseDirectory, wrapperDirectory)
|
||||
: baseDirectory;
|
||||
return path.join(executableDirectory, gradlew.wrapperFilename());
|
||||
return path.resolve(executableDirectory, gradlew.wrapperFilename());
|
||||
});
|
||||
}
|
||||
function resolveBuildRootDirectory(baseDirectory) {
|
||||
let buildRootDirectory = inputOrNull("build-root-directory");
|
||||
return buildRootDirectory == null ? baseDirectory : path.join(baseDirectory, buildRootDirectory);
|
||||
return buildRootDirectory == null
|
||||
? path.resolve(baseDirectory)
|
||||
: path.resolve(baseDirectory, buildRootDirectory);
|
||||
}
|
||||
function parseCommandLineArguments() {
|
||||
const input = inputOrNull("arguments");
|
||||
|
|
Loading…
Reference in a new issue