mirror of
https://github.com/gradle/actions.git
synced 2025-04-23 03:09:20 +08:00
Ensure to set terms of service properties on any type of root project plugin
This commit is contained in:
parent
28edd504af
commit
58f48a315c
@ -146,28 +146,33 @@ if (GradleVersion.current() < GradleVersion.version('6.0')) {
|
|||||||
buildScanExtension.value CI_AUTO_INJECTION_CUSTOM_VALUE_NAME, CI_AUTO_INJECTION_CUSTOM_VALUE_VALUE
|
buildScanExtension.value CI_AUTO_INJECTION_CUSTOM_VALUE_NAME, CI_AUTO_INJECTION_CUSTOM_VALUE_VALUE
|
||||||
}
|
}
|
||||||
|
|
||||||
if (develocityUrl && develocityEnforceUrl) {
|
pluginManager.withPlugin(BUILD_SCAN_PLUGIN_ID) {
|
||||||
logger.quiet("Enforcing Develocity: $develocityUrl, allowUntrustedServer: $develocityAllowUntrustedServer for Build Scan plugin")
|
afterEvaluate {
|
||||||
pluginManager.withPlugin(BUILD_SCAN_PLUGIN_ID) {
|
if (develocityUrl && develocityEnforceUrl) {
|
||||||
afterEvaluate {
|
logger.quiet("Enforcing Develocity: $develocityUrl, allowUntrustedServer: $develocityAllowUntrustedServer for Build Scan plugin")
|
||||||
buildScan.server = develocityUrl
|
buildScan.server = develocityUrl
|
||||||
buildScan.allowUntrustedServer = develocityAllowUntrustedServer
|
buildScan.allowUntrustedServer = develocityAllowUntrustedServer
|
||||||
}
|
}
|
||||||
}
|
|
||||||
pluginManager.withPlugin(DEVELOCITY_PLUGIN_ID) {
|
if (buildScanTermsOfServiceUrl && buildScanTermsOfServiceAgree) {
|
||||||
afterEvaluate {
|
buildScan.termsOfServiceUrl = buildScanTermsOfServiceUrl
|
||||||
develocity.server = develocityUrl
|
buildScan.termsOfServiceAgree = buildScanTermsOfServiceAgree
|
||||||
develocity.allowUntrustedServer = develocityAllowUntrustedServer
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
pluginManager.withPlugin(DEVELOCITY_PLUGIN_ID) {
|
||||||
|
afterEvaluate {
|
||||||
|
if (develocityUrl && develocityEnforceUrl) {
|
||||||
|
logger.quiet("Enforcing Develocity: $develocityUrl, allowUntrustedServer: $develocityAllowUntrustedServer for Build Scan plugin")
|
||||||
|
develocity.server = develocityUrl
|
||||||
|
develocity.allowUntrustedServer = develocityAllowUntrustedServer
|
||||||
|
}
|
||||||
|
|
||||||
if (buildScanTermsOfServiceUrl && buildScanTermsOfServiceAgree) {
|
if (buildScanTermsOfServiceUrl && buildScanTermsOfServiceAgree) {
|
||||||
def buildScanExtension = atLeastGradle5
|
develocity.buildScan.termsOfServiceUrl = buildScanTermsOfServiceUrl
|
||||||
? dvOrGe(develocity.buildScan, buildScan)
|
develocity.buildScan.termsOfServiceAgree = buildScanTermsOfServiceAgree
|
||||||
: buildScan
|
}
|
||||||
buildScanExtension.termsOfServiceUrl = buildScanTermsOfServiceUrl
|
}
|
||||||
buildScanExtension.termsOfServiceAgree = buildScanTermsOfServiceAgree
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user