11/*
22 * Initscript for injection of Develocity into Gradle builds.
3- * Version: 1.3
3+ * Version: 2.0
44 */
55
66import org.gradle.util.GradleVersion
@@ -18,24 +18,24 @@ initscript {
1818 return gradle. startParameter. systemPropertiesArgs[name] ?: System . getProperty(name) ?: System . getenv(envVarName)
1919 }
2020
21- def requestedInitScriptName = getInputParam(gradle, ' develocity. injection.init-script-name' )
21+ def requestedInitScriptName = getInputParam(gradle, ' develocity- injection.init-script-name' )
2222 def initScriptName = buildscript. sourceFile. name
2323 if (requestedInitScriptName != initScriptName) {
2424 return
2525 }
2626
2727 // Plugin loading is only required for Develocity injection. Abort early if not enabled.
28- def develocityInjectionEnabled = Boolean . parseBoolean(getInputParam(gradle, " develocity.injection- enabled" ))
28+ def develocityInjectionEnabled = Boolean . parseBoolean(getInputParam(gradle, " develocity-injection. enabled" ))
2929 if (! develocityInjectionEnabled) {
3030 return
3131 }
3232
33- def pluginRepositoryUrl = getInputParam(gradle, ' gradle .plugin-repository.url' )
34- def pluginRepositoryUsername = getInputParam(gradle, ' gradle .plugin-repository.username' )
35- def pluginRepositoryPassword = getInputParam(gradle, ' gradle .plugin-repository.password' )
36- def develocityPluginVersion = getInputParam(gradle, ' develocity. plugin.version' )
37- def ccudPluginVersion = getInputParam(gradle, ' develocity.ccud-plugin.version' )
38- def logLevel = Boolean . parseBoolean(getInputParam(gradle, ' develocity. injection.debug' )) ? LogLevel . LIFECYCLE : LogLevel . INFO
33+ def pluginRepositoryUrl = getInputParam(gradle, ' develocity-injection .plugin-repository.url' )
34+ def pluginRepositoryUsername = getInputParam(gradle, ' develocity-injection .plugin-repository.username' )
35+ def pluginRepositoryPassword = getInputParam(gradle, ' develocity-injection .plugin-repository.password' )
36+ def develocityPluginVersion = getInputParam(gradle, ' develocity-injection.develocity- plugin.version' )
37+ def ccudPluginVersion = getInputParam(gradle, ' develocity-injection .ccud-plugin.version' )
38+ def logLevel = Boolean . parseBoolean(getInputParam(gradle, ' develocity- injection.debug' )) ? LogLevel . LIFECYCLE : LogLevel . INFO
3939
4040 def atLeastGradle5 = GradleVersion . current() >= GradleVersion . version(' 5.0' )
4141 def atLeastGradle4 = GradleVersion . current() >= GradleVersion . version(' 4.0' )
@@ -91,10 +91,10 @@ if (!isTopLevelBuild) {
9191 return
9292}
9393
94- def requestedInitScriptName = getInputParam(gradle, ' develocity. injection.init-script-name' )
94+ def requestedInitScriptName = getInputParam(gradle, ' develocity- injection.init-script-name' )
9595def initScriptName = buildscript. sourceFile. name
9696
97- def develocityInjectionEnabled = Boolean . parseBoolean(getInputParam(gradle, " develocity.injection- enabled" ))
97+ def develocityInjectionEnabled = Boolean . parseBoolean(getInputParam(gradle, " develocity-injection. enabled" ))
9898if (develocityInjectionEnabled) {
9999 if (requestedInitScriptName != initScriptName) {
100100 logger. log(LogLevel . WARN , " Develocity injection not enabled because requested init script name was '${ requestedInitScriptName} ', but '${ initScriptName} ' was expected" )
@@ -127,17 +127,17 @@ void enableDevelocityInjection() {
127127 def CCUD_PLUGIN_ID = ' com.gradle.common-custom-user-data-gradle-plugin'
128128 def CCUD_PLUGIN_CLASS = ' com.gradle.CommonCustomUserDataGradlePlugin'
129129
130- def develocityUrl = getInputParam(gradle, ' develocity.url' )
131- def develocityAllowUntrustedServer = Boolean . parseBoolean(getInputParam(gradle, ' develocity.allow-untrusted-server' ))
132- def develocityEnforceUrl = Boolean . parseBoolean(getInputParam(gradle, ' develocity.enforce-url' ))
133- def buildScanUploadInBackground = Boolean . parseBoolean(getInputParam(gradle, ' develocity.build-scan .upload-in-background' ))
134- def develocityCaptureFileFingerprints = getInputParam(gradle, ' develocity.capture-file-fingerprints' ) ? Boolean . parseBoolean(getInputParam(gradle, ' develocity.capture-file-fingerprints' )) : true
135- def develocityPluginVersion = getInputParam(gradle, ' develocity. plugin.version' )
136- def ccudPluginVersion = getInputParam(gradle, ' develocity.ccud-plugin.version' )
137- def buildScanTermsOfUseUrl = getInputParam(gradle, ' develocity.terms-of-use.url' )
138- def buildScanTermsOfUseAgree = getInputParam(gradle, ' develocity.terms-of-use.agree' )
139- def ciAutoInjectionCustomValueValue = getInputParam(gradle, ' develocity.auto -injection.custom-value' )
140- def logLevel = Boolean . parseBoolean(getInputParam(gradle, ' develocity. injection.debug' )) ? LogLevel . LIFECYCLE : LogLevel . INFO
130+ def develocityUrl = getInputParam(gradle, ' develocity-injection .url' )
131+ def develocityAllowUntrustedServer = Boolean . parseBoolean(getInputParam(gradle, ' develocity-injection .allow-untrusted-server' ))
132+ def develocityEnforceUrl = Boolean . parseBoolean(getInputParam(gradle, ' develocity-injection .enforce-url' ))
133+ def buildScanUploadInBackground = Boolean . parseBoolean(getInputParam(gradle, ' develocity-injection .upload-in-background' ))
134+ def develocityCaptureFileFingerprints = getInputParam(gradle, ' develocity-injection .capture-file-fingerprints' ) ? Boolean . parseBoolean(getInputParam(gradle, ' develocity-injection .capture-file-fingerprints' )) : true
135+ def develocityPluginVersion = getInputParam(gradle, ' develocity-injection.develocity- plugin.version' )
136+ def ccudPluginVersion = getInputParam(gradle, ' develocity-injection .ccud-plugin.version' )
137+ def buildScanTermsOfUseUrl = getInputParam(gradle, ' develocity-injection .terms-of-use.url' )
138+ def buildScanTermsOfUseAgree = getInputParam(gradle, ' develocity-injection .terms-of-use.agree' )
139+ def ciAutoInjectionCustomValueValue = getInputParam(gradle, ' develocity-injection.custom-value' )
140+ def logLevel = Boolean . parseBoolean(getInputParam(gradle, ' develocity- injection.debug' )) ? LogLevel . LIFECYCLE : LogLevel . INFO
141141
142142 def atLeastGradle5 = GradleVersion . current() >= GradleVersion . version(' 5.0' )
143143 def atLeastGradle4 = GradleVersion . current() >= GradleVersion . version(' 4.0' )
@@ -372,7 +372,7 @@ void enableDevelocityInjection() {
372372}
373373
374374void applyPluginExternally (def pluginManager , String pluginClassName , String pluginVersion ) {
375- def logLevel = Boolean . parseBoolean(getInputParam(gradle, ' develocity. injection.debug' )) ? LogLevel . LIFECYCLE : LogLevel . INFO
375+ def logLevel = Boolean . parseBoolean(getInputParam(gradle, ' develocity- injection.debug' )) ? LogLevel . LIFECYCLE : LogLevel . INFO
376376 logger. log(logLevel, " Applying $pluginClassName with version $pluginVersion via init script" )
377377
378378 def externallyApplied = ' develocity.externally-applied'
0 commit comments