@@ -73282,19 +73282,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
73282
73282
step((generator = generator.apply(thisArg, _arguments || [])).next());
73283
73283
});
73284
73284
};
73285
- var __importDefault = (this && this.__importDefault) || function (mod) {
73286
- return (mod && mod.__esModule) ? mod : { "default": mod };
73287
- };
73288
73285
Object.defineProperty(exports, "__esModule", ({ value: true }));
73289
73286
exports.executeGradleBuild = void 0;
73290
73287
const core = __importStar(__nccwpck_require__(2186));
73291
73288
const exec = __importStar(__nccwpck_require__(1514));
73292
- const fs_1 = __importDefault(__nccwpck_require__(7147));
73293
73289
const gradlew = __importStar(__nccwpck_require__(2335));
73294
73290
function executeGradleBuild(executable, root, args) {
73295
73291
return __awaiter(this, void 0, void 0, function* () {
73296
- const toExecute = executable !== null && executable !== void 0 ? executable : gradlew.locateGradleWrapperScript(root);
73297
- verifyIsExecutableScript(toExecute);
73292
+ const toExecute = executable !== null && executable !== void 0 ? executable : gradlew.gradleWrapperScript(root);
73298
73293
const status = yield exec.exec(toExecute, args, {
73299
73294
cwd: root,
73300
73295
ignoreReturnCode: true
@@ -73305,14 +73300,6 @@ function executeGradleBuild(executable, root, args) {
73305
73300
});
73306
73301
}
73307
73302
exports.executeGradleBuild = executeGradleBuild;
73308
- function verifyIsExecutableScript(toExecute) {
73309
- try {
73310
- fs_1.default.accessSync(toExecute, fs_1.default.constants.X_OK);
73311
- }
73312
- catch (err) {
73313
- throw new Error(`Gradle script '${toExecute}' is not executable.`);
73314
- }
73315
- }
73316
73303
73317
73304
73318
73305
/***/ }),
@@ -73349,27 +73336,41 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
73349
73336
return (mod && mod.__esModule) ? mod : { "default": mod };
73350
73337
};
73351
73338
Object.defineProperty(exports, "__esModule", ({ value: true }));
73352
- exports.locateGradleWrapperScript = exports.installScriptFilename = exports.wrapperScriptFilename = void 0;
73339
+ exports.gradleWrapperScript = exports.installScriptFilename = exports.wrapperScriptFilename = void 0;
73353
73340
const path = __importStar(__nccwpck_require__(1017));
73354
73341
const fs_1 = __importDefault(__nccwpck_require__(7147));
73355
73342
const IS_WINDOWS = process.platform === 'win32';
73356
73343
function wrapperScriptFilename() {
73357
- return IS_WINDOWS ? 'gradlew.bat' : 'gradlew';
73344
+ return IS_WINDOWS ? 'gradlew.bat' : './ gradlew';
73358
73345
}
73359
73346
exports.wrapperScriptFilename = wrapperScriptFilename;
73360
73347
function installScriptFilename() {
73361
73348
return IS_WINDOWS ? 'gradle.bat' : 'gradle';
73362
73349
}
73363
73350
exports.installScriptFilename = installScriptFilename;
73364
- function locateGradleWrapperScript (buildRootDirectory) {
73351
+ function gradleWrapperScript (buildRootDirectory) {
73365
73352
validateGradleWrapper(buildRootDirectory);
73366
- return path.resolve(buildRootDirectory, wrapperScriptFilename() );
73353
+ return wrapperScriptFilename();
73367
73354
}
73368
- exports.locateGradleWrapperScript = locateGradleWrapperScript ;
73355
+ exports.gradleWrapperScript = gradleWrapperScript ;
73369
73356
function validateGradleWrapper(buildRootDirectory) {
73357
+ const wrapperScript = path.resolve(buildRootDirectory, wrapperScriptFilename());
73358
+ verifyExists(wrapperScript, 'Gradle Wrapper script');
73359
+ verifyIsExecutableScript(wrapperScript);
73370
73360
const wrapperProperties = path.resolve(buildRootDirectory, 'gradle/wrapper/gradle-wrapper.properties');
73371
- if (!fs_1.default.existsSync(wrapperProperties)) {
73372
- throw new Error(`Cannot locate a Gradle wrapper properties file at '${wrapperProperties}'. Specify 'gradle-version' or 'gradle-executable' for projects without Gradle wrapper configured.`);
73361
+ verifyExists(wrapperProperties, 'Gradle wrapper properties file');
73362
+ }
73363
+ function verifyExists(file, description) {
73364
+ if (!fs_1.default.existsSync(file)) {
73365
+ throw new Error(`Cannot locate ${description} at '${file}'. Specify 'gradle-version' or 'gradle-executable' for projects without Gradle wrapper configured.`);
73366
+ }
73367
+ }
73368
+ function verifyIsExecutableScript(toExecute) {
73369
+ try {
73370
+ fs_1.default.accessSync(toExecute, fs_1.default.constants.X_OK);
73371
+ }
73372
+ catch (err) {
73373
+ throw new Error(`Gradle script '${toExecute}' is not executable.`);
73373
73374
}
73374
73375
}
73375
73376
0 commit comments