Skip to content

Commit 416d438

Browse files
committed
Configure build scan publication.
1 parent 70d9463 commit 416d438

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

build.gradle.kts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,6 @@ allprojects {
5252
}
5353
}
5454

55-
56-
extensions.findByName("buildScan")?.withGroovyBuilder {
57-
setProperty("termsOfServiceUrl", "https://gradle.com/terms-of-service")
58-
setProperty("termsOfServiceAgree", "yes")
59-
}
60-
6155
subprojects {
6256
afterEvaluate {
6357
configureKotlinOptIns()

settings.gradle.kts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,20 @@ dependencyResolutionManagement {
4646
}
4747

4848
plugins {
49+
id("com.gradle.develocity") version "4.3.2"
4950
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
5051
}
5152

53+
develocity {
54+
buildScan {
55+
// Keep scans opt-in via --scan and only allow publication from CI.
56+
publishing.onlyIf { !System.getenv("CI").isNullOrEmpty() }
57+
termsOfUseUrl = "https://gradle.com/terms-of-service"
58+
termsOfUseAgree = "yes"
59+
uploadInBackground = System.getenv("CI").isNullOrEmpty()
60+
}
61+
}
62+
5263
fun includeProject(projectPath: String, dir: String? = null) {
5364
include(projectPath)
5465
if (dir != null) project(projectPath).projectDir = file(dir)

0 commit comments

Comments
 (0)