This commit is contained in:
Paul Merlin 2019-10-28 13:31:49 +01:00
parent 580b26a94c
commit 064f85c156

View file

@ -45,22 +45,24 @@ function resolveGradleExecutable(baseDirectory) {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
const gradleVersion = inputOrNull("gradle-version"); const gradleVersion = inputOrNull("gradle-version");
if (gradleVersion != null) { if (gradleVersion != null) {
return provision.gradleVersion(gradleVersion); return path.resolve(yield provision.gradleVersion(gradleVersion));
} }
const gradleExecutable = inputOrNull("gradle-executable"); const gradleExecutable = inputOrNull("gradle-executable");
if (gradleExecutable != null) { if (gradleExecutable != null) {
return path.join(baseDirectory, gradleExecutable); return path.resolve(baseDirectory, gradleExecutable);
} }
const wrapperDirectory = inputOrNull("wrapper-directory"); const wrapperDirectory = inputOrNull("wrapper-directory");
const executableDirectory = wrapperDirectory != null const executableDirectory = wrapperDirectory != null
? path.join(baseDirectory, wrapperDirectory) ? path.join(baseDirectory, wrapperDirectory)
: baseDirectory; : baseDirectory;
return path.join(executableDirectory, gradlew.wrapperFilename()); return path.resolve(executableDirectory, gradlew.wrapperFilename());
}); });
} }
function resolveBuildRootDirectory(baseDirectory) { function resolveBuildRootDirectory(baseDirectory) {
let buildRootDirectory = inputOrNull("build-root-directory"); 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() { function parseCommandLineArguments() {
const input = inputOrNull("arguments"); const input = inputOrNull("arguments");