@@ -9,6 +9,7 @@ import sbt.*
9
9
import complete .DefaultParsers ._
10
10
import pl .project13 .scala .sbt .JmhPlugin
11
11
import pl .project13 .scala .sbt .JmhPlugin .JmhKeys .Jmh
12
+ import com .gradle .develocity .agent .sbt .DevelocityPlugin .autoImport ._
12
13
import com .typesafe .sbt .packager .Keys ._
13
14
import com .typesafe .sbt .packager .MappingsHelper .directory
14
15
import com .typesafe .sbt .packager .universal .UniversalPlugin
@@ -268,6 +269,25 @@ object Build {
268
269
269
270
// enable verbose exception messages for JUnit
270
271
(Test / testOptions) += Tests .Argument (TestFrameworks .JUnit , " -a" , " -v" , " -s" ),
272
+
273
+ // Configuration to publish build scans to develocity.scala-lang.org
274
+ develocityConfiguration := {
275
+ val isInsideCI = insideCI.value
276
+ val previousConfig = develocityConfiguration.value
277
+ val previousBuildScan = previousConfig.buildScan
278
+ previousConfig
279
+ .withProjectId(ProjectId (" scala3" ))
280
+ .withServer(previousConfig.server.withUrl(Some (url(" https://develocity.scala-lang.org" ))))
281
+ .withBuildScan(
282
+ previousBuildScan
283
+ .withPublishing(Publishing .onlyIf(_.authenticated))
284
+ .withBackgroundUpload(! isInsideCI)
285
+ .tag(if (isInsideCI) " CI" else " Local" )
286
+ .withLinks(previousBuildScan.links ++ GithubEnv .develocityLinks)
287
+ .withValues(previousBuildScan.values ++ GithubEnv .develocityValues)
288
+ .withObfuscation(previousBuildScan.obfuscation.withIpAddresses(_.map(_ => " 0.0.0.0" )))
289
+ )
290
+ }
271
291
)
272
292
273
293
// Settings shared globally (scoped in Global). Used in build.sbt
0 commit comments