Update develocity-injection init script

This commit is contained in:
bigdaz 2024-05-09 12:41:38 +00:00 committed by github-actions[bot]
parent 90f1de0556
commit fed068c4df

View File

@ -1,3 +1,8 @@
/*
* Initscript for injection of Develocity into Gradle builds.
* Version: v0.0.1
*/
import org.gradle.util.GradleVersion import org.gradle.util.GradleVersion
// note that there is no mechanism to share code between the initscript{} block and the main script, so some logic is duplicated // note that there is no mechanism to share code between the initscript{} block and the main script, so some logic is duplicated
@ -154,12 +159,12 @@ if (GradleVersion.current() < GradleVersion.version('6.0')) {
logger.lifecycle("Applying $pluginClass via init script") logger.lifecycle("Applying $pluginClass via init script")
applyPluginExternally(pluginManager, pluginClass) applyPluginExternally(pluginManager, pluginClass)
def rootExtension = dvOrGe( def rootExtension = dvOrGe(
{ develocity }, { develocity },
{ buildScan } { buildScan }
) )
def buildScanExtension = dvOrGe( def buildScanExtension = dvOrGe(
{ rootExtension.buildScan }, { rootExtension.buildScan },
{ rootExtension } { rootExtension }
) )
if (develocityUrl) { if (develocityUrl) {
logger.lifecycle("Connection to Develocity: $develocityUrl, allowUntrustedServer: $develocityAllowUntrustedServer, captureFileFingerprints: $develocityCaptureFileFingerprints") logger.lifecycle("Connection to Develocity: $develocityUrl, allowUntrustedServer: $develocityAllowUntrustedServer, captureFileFingerprints: $develocityCaptureFileFingerprints")