mirror of
https://github.com/gradle/actions.git
synced 2025-11-26 17:09:10 +08:00
Inject Develocity plugin for versions 3.17 and above (#62)
To handle the rebranding of the GE plugin, this PR updates the inject-develocity init script to apply the `com.gradle.develocity` plugin if `3.17+` version of the plugin is requested.
This commit is contained in:
38
dist/setup-gradle/main/index.js
vendored
38
dist/setup-gradle/main/index.js
vendored
@@ -139453,19 +139453,22 @@ exports.setup = void 0;
|
||||
const core = __importStar(__nccwpck_require__(42186));
|
||||
const input_params_1 = __nccwpck_require__(23885);
|
||||
function setup() {
|
||||
if ((0, input_params_1.getBuildScanPublishEnabled)() && verifyTermsOfServiceAgreement()) {
|
||||
maybeExportVariable('DEVELOCITY_INJECTION_INIT_SCRIPT_NAME', 'gradle-actions.inject-develocity.init.gradle');
|
||||
maybeExportVariable('DEVELOCITY_AUTO_INJECTION_CUSTOM_VALUE', 'gradle-actions');
|
||||
if ((0, input_params_1.getBuildScanPublishEnabled)() && verifyTermsOfUseAgreement()) {
|
||||
maybeExportVariable('DEVELOCITY_INJECTION_ENABLED', 'true');
|
||||
maybeExportVariable('DEVELOCITY_PLUGIN_VERSION', '3.16.2');
|
||||
maybeExportVariable('DEVELOCITY_CCUD_PLUGIN_VERSION', '1.13');
|
||||
maybeExportVariable('BUILD_SCAN_TERMS_OF_SERVICE_URL', (0, input_params_1.getBuildScanTermsOfServiceUrl)());
|
||||
maybeExportVariable('BUILD_SCAN_TERMS_OF_SERVICE_AGREE', (0, input_params_1.getBuildScanTermsOfServiceAgree)());
|
||||
maybeExportVariable('DEVELOCITY_TERMS_OF_USE_URL', (0, input_params_1.getBuildScanTermsOfUseUrl)());
|
||||
maybeExportVariable('DEVELOCITY_TERMS_OF_USE_AGREE', (0, input_params_1.getBuildScanTermsOfUseAgree)());
|
||||
}
|
||||
}
|
||||
exports.setup = setup;
|
||||
function verifyTermsOfServiceAgreement() {
|
||||
if ((0, input_params_1.getBuildScanTermsOfServiceUrl)() !== 'https://gradle.com/terms-of-service' ||
|
||||
(0, input_params_1.getBuildScanTermsOfServiceAgree)() !== 'yes') {
|
||||
core.warning(`Terms of service must be agreed in order to publish build scans.`);
|
||||
function verifyTermsOfUseAgreement() {
|
||||
if (((0, input_params_1.getBuildScanTermsOfUseUrl)() !== 'https://gradle.com/terms-of-service' &&
|
||||
(0, input_params_1.getBuildScanTermsOfUseUrl)() !== 'https://gradle.com/help/legal-terms-of-use') ||
|
||||
(0, input_params_1.getBuildScanTermsOfUseAgree)() !== 'yes') {
|
||||
core.warning(`Terms of use must be agreed in order to publish build scans.`);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -141322,7 +141325,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.JobSummaryOption = exports.DependencyGraphOption = exports.parseNumericInput = exports.getArtifactRetentionDays = exports.getDependencyGraphContinueOnFailure = exports.getDependencyGraphOption = exports.getBuildScanTermsOfServiceAgree = exports.getBuildScanTermsOfServiceUrl = exports.getBuildScanPublishEnabled = 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;
|
||||
exports.JobSummaryOption = exports.DependencyGraphOption = exports.parseNumericInput = exports.getArtifactRetentionDays = exports.getDependencyGraphContinueOnFailure = exports.getDependencyGraphOption = exports.getBuildScanTermsOfUseAgree = exports.getBuildScanTermsOfUseUrl = exports.getBuildScanPublishEnabled = 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 string_argv_1 = __nccwpck_require__(19663);
|
||||
function isCacheDisabled() {
|
||||
@@ -141402,14 +141405,21 @@ function getBuildScanPublishEnabled() {
|
||||
return getBooleanInput('build-scan-publish');
|
||||
}
|
||||
exports.getBuildScanPublishEnabled = getBuildScanPublishEnabled;
|
||||
function getBuildScanTermsOfServiceUrl() {
|
||||
return core.getInput('build-scan-terms-of-service-url');
|
||||
function getBuildScanTermsOfUseUrl() {
|
||||
return getTermsOfUseProp('build-scan-terms-of-use-url', 'build-scan-terms-of-service-url');
|
||||
}
|
||||
exports.getBuildScanTermsOfServiceUrl = getBuildScanTermsOfServiceUrl;
|
||||
function getBuildScanTermsOfServiceAgree() {
|
||||
return core.getInput('build-scan-terms-of-service-agree');
|
||||
exports.getBuildScanTermsOfUseUrl = getBuildScanTermsOfUseUrl;
|
||||
function getBuildScanTermsOfUseAgree() {
|
||||
return getTermsOfUseProp('build-scan-terms-of-use-agree', 'build-scan-terms-of-service-agree');
|
||||
}
|
||||
exports.getBuildScanTermsOfUseAgree = getBuildScanTermsOfUseAgree;
|
||||
function getTermsOfUseProp(newPropName, oldPropName) {
|
||||
const newProp = core.getInput(newPropName);
|
||||
if (newProp !== '') {
|
||||
return newProp;
|
||||
}
|
||||
return core.getInput(oldPropName);
|
||||
}
|
||||
exports.getBuildScanTermsOfServiceAgree = getBuildScanTermsOfServiceAgree;
|
||||
function parseJobSummaryOption(paramName) {
|
||||
const val = core.getInput(paramName);
|
||||
switch (val.toLowerCase().trim()) {
|
||||
|
||||
Reference in New Issue
Block a user