build: Publish Gradle buildscans when CI variable is non-empty (#316)
This should allow for periodic tracking of improvements (or regressions) in the build performance. Fixes #314
This commit is contained in:
parent
07e1d4c760
commit
239f5cb274
|
@ -17,6 +17,22 @@ dependencyResolutionManagement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id("com.gradle.enterprise") version "3.16"
|
||||||
|
}
|
||||||
|
|
||||||
|
val isCiBuild = !System.getenv("CI").isNullOrBlank()
|
||||||
|
|
||||||
|
gradleEnterprise {
|
||||||
|
buildScan {
|
||||||
|
termsOfServiceUrl = "https://gradle.com/terms-of-service"
|
||||||
|
termsOfServiceAgree = "yes"
|
||||||
|
isUploadInBackground = !isCiBuild
|
||||||
|
tag(if (isCiBuild) "CI" else "Local")
|
||||||
|
publishAlwaysIf(isCiBuild)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
enableFeaturePreview("STABLE_CONFIGURATION_CACHE")
|
enableFeaturePreview("STABLE_CONFIGURATION_CACHE")
|
||||||
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
|
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue