@@ -13,18 +13,44 @@ pluginManagement {
13
13
}
14
14
15
15
plugins {
16
- id(" com.gradle.enterprise " ) version( " 3.13 " )
16
+ id(" com.gradle.develocity " ) version " 3.19.2 "
17
17
}
18
18
19
- gradleEnterprise {
19
+ develocity {
20
20
buildScan {
21
- termsOfServiceUrl = " https://gradle.com/terms-of-service"
22
- termsOfServiceAgree = " yes"
21
+ termsOfUseUrl = " https://gradle.com/terms-of-service"
22
+ termsOfUseAgree = " yes"
23
+
24
+ // Automatically publish scans in CI
25
+ publishing.onlyIf { ! System .getenv(" CI" ).isNullOrEmpty() }
26
+
23
27
capture {
24
- // Capture task inputs.
25
- isTaskInputFiles = true
28
+ // https://docs.gradle.com/enterprise/gradle-plugin/current/#capturing_resource_usage
29
+ resourceUsage.set(true )
30
+ buildLogging.set(false )
31
+ testLogging.set(false )
32
+ }
33
+
34
+ obfuscation {
35
+ username { _ -> " __redacted__" }
36
+ ipAddresses { addresses -> addresses.map { _ -> " 0.0.0.0" } }
37
+ externalProcessName { processName -> " __redacted__" }
38
+ }
39
+
40
+ // Add custom values
41
+ value(" Project Name" , rootProject.name)
42
+ value(" Build Branch" , System .getenv(" GITHUB_REF" )?.replace(" refs/heads/" , " " ) ? : " N/A" )
43
+ value(" Build Commit" , System .getenv(" GITHUB_SHA" ) ? : " N/A" )
44
+
45
+ val ciLink = System .getenv(" GITHUB_ACTIONS" )?.let { " https://github.com/${System .getenv(" GITHUB_REPOSITORY" )} /actions/runs/${System .getenv(" GITHUB_RUN_ID" )} " } ? : " N/A"
46
+ // Add tags to the build scan
47
+ tag(" CI" )
48
+ tag(System .getProperty(" os.name" ))
49
+ // Add links to related information
50
+ if (ciLink != " N/A" ) {
51
+ link(" GitHub Action" , ciLink)
52
+ } else {
53
+ tag(" local dev build" )
26
54
}
27
- // "auto-accept" license agreements only when running under CI server.
28
- publishAlwaysIf(! System .getenv(" CI" ).isNullOrEmpty())
29
55
}
30
56
}
0 commit comments