mirror of
https://github.com/gradle/actions.git
synced 2025-04-22 18:59:19 +08:00
Update develocity-injection init script to v0.5.1
Updates the develocity-injection init script to the latest reference script content from https://github.com/gradle/develocity-ci-injection.
This commit is contained in:
parent
0498421560
commit
b0cac0719b
@ -1,14 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
* Initscript for injection of Develocity into Gradle builds.
|
* Initscript for injection of Develocity into Gradle builds.
|
||||||
* Version: v0.5.0
|
* Version: v0.5.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
|
|
||||||
|
|
||||||
// conditionally apply the Develocity plugin to the classpath so it can be applied to the build further down in this script
|
|
||||||
initscript {
|
initscript {
|
||||||
|
// NOTE: there is no mechanism to share code between the initscript{} block and the main script, so some logic is duplicated
|
||||||
def isTopLevelBuild = !gradle.parent
|
def isTopLevelBuild = !gradle.parent
|
||||||
if (!isTopLevelBuild) {
|
if (!isTopLevelBuild) {
|
||||||
return
|
return
|
||||||
@ -26,7 +24,7 @@ initscript {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// plugin loading is only required for Develocity injection
|
// Plugin loading is only required for Develocity injection. Abort early if not enabled.
|
||||||
def develocityInjectionEnabled = Boolean.parseBoolean(getInputParam("develocity.injection-enabled"))
|
def develocityInjectionEnabled = Boolean.parseBoolean(getInputParam("develocity.injection-enabled"))
|
||||||
if (!develocityInjectionEnabled) {
|
if (!develocityInjectionEnabled) {
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user