mirror of
https://github.com/gradle/gradle-build-action.git
synced 2024-11-22 09:02:50 +00:00
Remove 'gradle-executable' input param
This commit is contained in:
parent
4dda5928c7
commit
3a75647ad4
9 changed files with 8 additions and 44 deletions
6
.github/workflows/integ-test-execution.yml
vendored
6
.github/workflows/integ-test-execution.yml
vendored
|
@ -46,12 +46,6 @@ jobs:
|
||||||
gradle-version: release-candidate
|
gradle-version: release-candidate
|
||||||
build-root-directory: .github/workflow-samples/no-wrapper
|
build-root-directory: .github/workflow-samples/no-wrapper
|
||||||
arguments: help
|
arguments: help
|
||||||
- name: Test use defined Gradle executable
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
gradle-executable: .github/workflow-samples/groovy-dsl/gradlew${{ matrix.script-suffix }}
|
|
||||||
build-root-directory: .github/workflow-samples/no-wrapper
|
|
||||||
arguments: help
|
|
||||||
|
|
||||||
gradle-versions:
|
gradle-versions:
|
||||||
strategy:
|
strategy:
|
||||||
|
|
|
@ -88,11 +88,6 @@ inputs:
|
||||||
required: false
|
required: false
|
||||||
deprecation-message: Using the action to execute Gradle directly is deprecated in favor of using the action to setup Gradle, and executing Gradle in a subsequent Step. See https://github.com/gradle/gradle-build-action?tab=readme-ov-file#use-the-action-to-setup-gradle.
|
deprecation-message: Using the action to execute Gradle directly is deprecated in favor of using the action to setup Gradle, and executing Gradle in a subsequent Step. See https://github.com/gradle/gradle-build-action?tab=readme-ov-file#use-the-action-to-setup-gradle.
|
||||||
|
|
||||||
gradle-executable:
|
|
||||||
description: Path to the Gradle executable. If specified, this executable will be added to the PATH and used for invoking Gradle.
|
|
||||||
required: false
|
|
||||||
deprecation-message: Using the action to execute Gradle directly is deprecated in favor of using the action to setup Gradle, and executing Gradle in a subsequent Step. See https://github.com/gradle/gradle-build-action?tab=readme-ov-file#use-the-action-to-setup-gradle.
|
|
||||||
|
|
||||||
generate-job-summary:
|
generate-job-summary:
|
||||||
description: When 'false', no Job Summary will be generated for the Job.
|
description: When 'false', no Job Summary will be generated for the Job.
|
||||||
required: false
|
required: false
|
||||||
|
|
16
dist/main/index.js
vendored
16
dist/main/index.js
vendored
|
@ -140288,7 +140288,7 @@ function validateGradleWrapper(buildRootDirectory) {
|
||||||
}
|
}
|
||||||
function verifyExists(file, description) {
|
function verifyExists(file, description) {
|
||||||
if (!fs_1.default.existsSync(file)) {
|
if (!fs_1.default.existsSync(file)) {
|
||||||
throw new Error(`Cannot locate ${description} at '${file}'. Specify 'gradle-version' or 'gradle-executable' for projects without Gradle wrapper configured.`);
|
throw new Error(`Cannot locate ${description} at '${file}'. Specify 'gradle-version' for projects without Gradle wrapper configured.`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function verifyIsExecutableScript(toExecute) {
|
function verifyIsExecutableScript(toExecute) {
|
||||||
|
@ -140332,7 +140332,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.JobSummaryOption = exports.DependencyGraphOption = exports.parseNumericInput = exports.getArtifactRetentionDays = exports.getDependencyGraphOption = exports.getPRCommentOption = exports.getJobSummaryOption = exports.isJobSummaryEnabled = exports.getGithubToken = exports.getJobMatrix = exports.getArguments = exports.getGradleExecutable = exports.getGradleVersion = exports.getBuildRootDirectory = exports.getCacheExcludes = exports.getCacheIncludes = exports.getCacheEncryptionKey = exports.isCacheCleanupEnabled = exports.isCacheDebuggingEnabled = exports.isCacheStrictMatch = exports.isCacheOverwriteExisting = exports.isCacheWriteOnly = exports.isCacheReadOnly = exports.isCacheDisabled = void 0;
|
exports.JobSummaryOption = exports.DependencyGraphOption = exports.parseNumericInput = exports.getArtifactRetentionDays = exports.getDependencyGraphOption = exports.getPRCommentOption = exports.getJobSummaryOption = exports.isJobSummaryEnabled = exports.getGithubToken = exports.getJobMatrix = exports.getArguments = exports.getGradleVersion = exports.getBuildRootDirectory = exports.getCacheExcludes = exports.getCacheIncludes = exports.getCacheEncryptionKey = exports.isCacheCleanupEnabled = exports.isCacheDebuggingEnabled = exports.isCacheStrictMatch = exports.isCacheOverwriteExisting = exports.isCacheWriteOnly = exports.isCacheReadOnly = exports.isCacheDisabled = void 0;
|
||||||
const core = __importStar(__nccwpck_require__(42186));
|
const core = __importStar(__nccwpck_require__(42186));
|
||||||
const string_argv_1 = __nccwpck_require__(19663);
|
const string_argv_1 = __nccwpck_require__(19663);
|
||||||
function isCacheDisabled() {
|
function isCacheDisabled() {
|
||||||
|
@ -140383,10 +140383,6 @@ function getGradleVersion() {
|
||||||
return core.getInput('gradle-version');
|
return core.getInput('gradle-version');
|
||||||
}
|
}
|
||||||
exports.getGradleVersion = getGradleVersion;
|
exports.getGradleVersion = getGradleVersion;
|
||||||
function getGradleExecutable() {
|
|
||||||
return core.getInput('gradle-executable');
|
|
||||||
}
|
|
||||||
exports.getGradleExecutable = getGradleExecutable;
|
|
||||||
function getArguments() {
|
function getArguments() {
|
||||||
const input = core.getInput('arguments');
|
const input = core.getInput('arguments');
|
||||||
return (0, string_argv_1.parseArgsStringToArgv)(input);
|
return (0, string_argv_1.parseArgsStringToArgv)(input);
|
||||||
|
@ -140781,19 +140777,13 @@ const cache = __importStar(__nccwpck_require__(27799));
|
||||||
const toolCache = __importStar(__nccwpck_require__(27784));
|
const toolCache = __importStar(__nccwpck_require__(27784));
|
||||||
const gradlew = __importStar(__nccwpck_require__(32335));
|
const gradlew = __importStar(__nccwpck_require__(32335));
|
||||||
const params = __importStar(__nccwpck_require__(23885));
|
const params = __importStar(__nccwpck_require__(23885));
|
||||||
const layout = __importStar(__nccwpck_require__(28182));
|
|
||||||
const cache_utils_1 = __nccwpck_require__(41678);
|
const cache_utils_1 = __nccwpck_require__(41678);
|
||||||
const gradleVersionsBaseUrl = 'https://services.gradle.org/versions';
|
const gradleVersionsBaseUrl = 'https://services.gradle.org/versions';
|
||||||
function provisionGradle() {
|
function provisionGradle() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const gradleVersion = params.getGradleVersion();
|
const gradleVersion = params.getGradleVersion();
|
||||||
if (gradleVersion !== '' && gradleVersion !== 'wrapper') {
|
if (gradleVersion !== '' && gradleVersion !== 'wrapper') {
|
||||||
return addToPath(path.resolve(yield installGradle(gradleVersion)));
|
return addToPath(yield installGradle(gradleVersion));
|
||||||
}
|
|
||||||
const gradleExecutable = params.getGradleExecutable();
|
|
||||||
if (gradleExecutable !== '') {
|
|
||||||
const workspaceDirectory = layout.workspaceDirectory();
|
|
||||||
return addToPath(path.resolve(workspaceDirectory, gradleExecutable));
|
|
||||||
}
|
}
|
||||||
return undefined;
|
return undefined;
|
||||||
});
|
});
|
||||||
|
|
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
6
dist/post/index.js
vendored
6
dist/post/index.js
vendored
|
@ -137653,7 +137653,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.JobSummaryOption = exports.DependencyGraphOption = exports.parseNumericInput = exports.getArtifactRetentionDays = exports.getDependencyGraphOption = exports.getPRCommentOption = exports.getJobSummaryOption = exports.isJobSummaryEnabled = exports.getGithubToken = exports.getJobMatrix = exports.getArguments = exports.getGradleExecutable = exports.getGradleVersion = exports.getBuildRootDirectory = exports.getCacheExcludes = exports.getCacheIncludes = exports.getCacheEncryptionKey = exports.isCacheCleanupEnabled = exports.isCacheDebuggingEnabled = exports.isCacheStrictMatch = exports.isCacheOverwriteExisting = exports.isCacheWriteOnly = exports.isCacheReadOnly = exports.isCacheDisabled = void 0;
|
exports.JobSummaryOption = exports.DependencyGraphOption = exports.parseNumericInput = exports.getArtifactRetentionDays = exports.getDependencyGraphOption = exports.getPRCommentOption = exports.getJobSummaryOption = exports.isJobSummaryEnabled = exports.getGithubToken = exports.getJobMatrix = exports.getArguments = exports.getGradleVersion = exports.getBuildRootDirectory = exports.getCacheExcludes = exports.getCacheIncludes = exports.getCacheEncryptionKey = exports.isCacheCleanupEnabled = exports.isCacheDebuggingEnabled = exports.isCacheStrictMatch = exports.isCacheOverwriteExisting = exports.isCacheWriteOnly = exports.isCacheReadOnly = exports.isCacheDisabled = void 0;
|
||||||
const core = __importStar(__nccwpck_require__(42186));
|
const core = __importStar(__nccwpck_require__(42186));
|
||||||
const string_argv_1 = __nccwpck_require__(19663);
|
const string_argv_1 = __nccwpck_require__(19663);
|
||||||
function isCacheDisabled() {
|
function isCacheDisabled() {
|
||||||
|
@ -137704,10 +137704,6 @@ function getGradleVersion() {
|
||||||
return core.getInput('gradle-version');
|
return core.getInput('gradle-version');
|
||||||
}
|
}
|
||||||
exports.getGradleVersion = getGradleVersion;
|
exports.getGradleVersion = getGradleVersion;
|
||||||
function getGradleExecutable() {
|
|
||||||
return core.getInput('gradle-executable');
|
|
||||||
}
|
|
||||||
exports.getGradleExecutable = getGradleExecutable;
|
|
||||||
function getArguments() {
|
function getArguments() {
|
||||||
const input = core.getInput('arguments');
|
const input = core.getInput('arguments');
|
||||||
return (0, string_argv_1.parseArgsStringToArgv)(input);
|
return (0, string_argv_1.parseArgsStringToArgv)(input);
|
||||||
|
|
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
|
@ -28,7 +28,7 @@ function validateGradleWrapper(buildRootDirectory: string): void {
|
||||||
function verifyExists(file: string, description: string): void {
|
function verifyExists(file: string, description: string): void {
|
||||||
if (!fs.existsSync(file)) {
|
if (!fs.existsSync(file)) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Cannot locate ${description} at '${file}'. Specify 'gradle-version' or 'gradle-executable' for projects without Gradle wrapper configured.`
|
`Cannot locate ${description} at '${file}'. Specify 'gradle-version' for projects without Gradle wrapper configured.`
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,10 +49,6 @@ export function getGradleVersion(): string {
|
||||||
return core.getInput('gradle-version')
|
return core.getInput('gradle-version')
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getGradleExecutable(): string {
|
|
||||||
return core.getInput('gradle-executable')
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getArguments(): string[] {
|
export function getArguments(): string[] {
|
||||||
const input = core.getInput('arguments')
|
const input = core.getInput('arguments')
|
||||||
return parseArgsStringToArgv(input)
|
return parseArgsStringToArgv(input)
|
||||||
|
|
|
@ -8,7 +8,6 @@ import * as toolCache from '@actions/tool-cache'
|
||||||
|
|
||||||
import * as gradlew from './gradlew'
|
import * as gradlew from './gradlew'
|
||||||
import * as params from './input-params'
|
import * as params from './input-params'
|
||||||
import * as layout from './repository-layout'
|
|
||||||
import {handleCacheFailure, isCacheDisabled, isCacheReadOnly} from './cache-utils'
|
import {handleCacheFailure, isCacheDisabled, isCacheReadOnly} from './cache-utils'
|
||||||
|
|
||||||
const gradleVersionsBaseUrl = 'https://services.gradle.org/versions'
|
const gradleVersionsBaseUrl = 'https://services.gradle.org/versions'
|
||||||
|
@ -20,13 +19,7 @@ const gradleVersionsBaseUrl = 'https://services.gradle.org/versions'
|
||||||
export async function provisionGradle(): Promise<string | undefined> {
|
export async function provisionGradle(): Promise<string | undefined> {
|
||||||
const gradleVersion = params.getGradleVersion()
|
const gradleVersion = params.getGradleVersion()
|
||||||
if (gradleVersion !== '' && gradleVersion !== 'wrapper') {
|
if (gradleVersion !== '' && gradleVersion !== 'wrapper') {
|
||||||
return addToPath(path.resolve(await installGradle(gradleVersion)))
|
return addToPath(await installGradle(gradleVersion))
|
||||||
}
|
|
||||||
|
|
||||||
const gradleExecutable = params.getGradleExecutable()
|
|
||||||
if (gradleExecutable !== '') {
|
|
||||||
const workspaceDirectory = layout.workspaceDirectory()
|
|
||||||
return addToPath(path.resolve(workspaceDirectory, gradleExecutable))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return undefined
|
return undefined
|
||||||
|
|
Loading…
Reference in a new issue