mirror of
https://github.com/gradle/actions.git
synced 2025-04-21 18:29:18 +08:00
Log property overrides once for both extensions
This commit is contained in:
parent
e8310b38da
commit
28edd504af
@ -147,16 +147,15 @@ if (GradleVersion.current() < GradleVersion.version('6.0')) {
|
||||
}
|
||||
|
||||
if (develocityUrl && develocityEnforceUrl) {
|
||||
logger.quiet("Enforcing Develocity: $develocityUrl, allowUntrustedServer: $develocityAllowUntrustedServer for Build Scan plugin")
|
||||
pluginManager.withPlugin(BUILD_SCAN_PLUGIN_ID) {
|
||||
afterEvaluate {
|
||||
logger.quiet("Enforcing Develocity: $develocityUrl, allowUntrustedServer: $develocityAllowUntrustedServer for Build Scan plugin")
|
||||
buildScan.server = develocityUrl
|
||||
buildScan.allowUntrustedServer = develocityAllowUntrustedServer
|
||||
}
|
||||
}
|
||||
pluginManager.withPlugin(DEVELOCITY_PLUGIN_ID) {
|
||||
afterEvaluate {
|
||||
logger.quiet("Enforcing Develocity: $develocityUrl, allowUntrustedServer: $develocityAllowUntrustedServer for Develocity plugin")
|
||||
develocity.server = develocityUrl
|
||||
develocity.allowUntrustedServer = develocityAllowUntrustedServer
|
||||
}
|
||||
@ -190,12 +189,15 @@ if (GradleVersion.current() < GradleVersion.version('6.0')) {
|
||||
def pluginClass = dvOrGe(DEVELOCITY_PLUGIN_CLASS, GRADLE_ENTERPRISE_PLUGIN_CLASS)
|
||||
logger.quiet("Applying $pluginClass via init script")
|
||||
applyPluginExternally(settings.pluginManager, pluginClass)
|
||||
eachDevelocitySettingsExtension(settings, SETTINGS_EXTENSION_CLASSES) { ext ->
|
||||
if (develocityUrl) {
|
||||
logger.quiet("Connection to Develocity: $develocityUrl, allowUntrustedServer: $develocityAllowUntrustedServer")
|
||||
if (develocityUrl) {
|
||||
logger.quiet("Connection to Develocity: $develocityUrl, allowUntrustedServer: $develocityAllowUntrustedServer")
|
||||
eachDevelocitySettingsExtension(settings, SETTINGS_EXTENSION_CLASSES) { ext ->
|
||||
ext.server = develocityUrl
|
||||
ext.allowUntrustedServer = develocityAllowUntrustedServer
|
||||
}
|
||||
}
|
||||
|
||||
eachDevelocitySettingsExtension(settings, SETTINGS_EXTENSION_CLASSES) { ext ->
|
||||
if (!shouldApplyDevelocityPlugin) {
|
||||
// Develocity plugin publishes build scans by default
|
||||
ext.buildScan.publishAlways()
|
||||
@ -206,8 +208,8 @@ if (GradleVersion.current() < GradleVersion.version('6.0')) {
|
||||
}
|
||||
|
||||
if (develocityUrl && develocityEnforceUrl) {
|
||||
logger.quiet("Enforcing Develocity: $develocityUrl, allowUntrustedServer: $develocityAllowUntrustedServer")
|
||||
eachDevelocitySettingsExtension(settings, SETTINGS_EXTENSION_CLASSES) { ext ->
|
||||
logger.quiet("Enforcing Develocity: $develocityUrl, allowUntrustedServer: $develocityAllowUntrustedServer")
|
||||
ext.server = develocityUrl
|
||||
ext.allowUntrustedServer = develocityAllowUntrustedServer
|
||||
}
|
||||
|
@ -310,8 +310,7 @@ class TestDevelocityInjection extends BaseInitScriptTest {
|
||||
void outputContainsDevelocityConnectionInfo(BuildResult result, String develocityUrl, boolean develocityAllowUntrustedServer) {
|
||||
def develocityConnectionInfo = "Connection to Develocity: $develocityUrl, allowUntrustedServer: $develocityAllowUntrustedServer"
|
||||
assert result.output.contains(develocityConnectionInfo)
|
||||
// Develocity plugin configures both the deprecated and new extensions
|
||||
assert 2 == result.output.count(develocityConnectionInfo)
|
||||
assert 1 == result.output.count(develocityConnectionInfo)
|
||||
}
|
||||
|
||||
void outputContainsPluginRepositoryInfo(BuildResult result, String gradlePluginRepositoryUrl) {
|
||||
@ -323,8 +322,7 @@ class TestDevelocityInjection extends BaseInitScriptTest {
|
||||
void outputEnforcesDevelocityUrl(BuildResult result, String develocityUrl, boolean develocityAllowUntrustedServer) {
|
||||
def enforceUrl = "Enforcing Develocity: $develocityUrl, allowUntrustedServer: $develocityAllowUntrustedServer"
|
||||
assert result.output.contains(enforceUrl)
|
||||
// Develocity plugin configures both the deprecated and new extensions
|
||||
assert 2 == result.output.count(enforceUrl)
|
||||
assert 1 == result.output.count(enforceUrl)
|
||||
}
|
||||
|
||||
private BuildResult run(TestGradleVersion testGradleVersion, TestConfig config, List<String> args = ["help"]) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user