Skip to content

Commit

Permalink
Disable build cache (remote and local)
Browse files Browse the repository at this point in the history
  • Loading branch information
adpi2 committed Aug 28, 2024
1 parent 3d08aa1 commit df43fa4
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -273,19 +273,25 @@ object Build {
// Configuration to publish build scans to develocity.scala-lang.org
develocityConfiguration := {
val isInsideCI = insideCI.value
val previousConfig = develocityConfiguration.value
val previousBuildScan = previousConfig.buildScan
previousConfig
val config = develocityConfiguration.value
val buildScan = config.buildScan
val buildCache = config.buildCache
config
.withProjectId(ProjectId("scala3"))
.withServer(previousConfig.server.withUrl(Some(url("https://develocity.scala-lang.org"))))
.withServer(config.server.withUrl(Some(url("https://develocity.scala-lang.org"))))
.withBuildScan(
previousBuildScan
buildScan
.withPublishing(Publishing.onlyIf(_.authenticated))
.withBackgroundUpload(!isInsideCI)
.tag(if (isInsideCI) "CI" else "Local")
.withLinks(previousBuildScan.links ++ GithubEnv.develocityLinks)
.withValues(previousBuildScan.values ++ GithubEnv.develocityValues)
.withObfuscation(previousBuildScan.obfuscation.withIpAddresses(_.map(_ => "0.0.0.0")))
.withLinks(buildScan.links ++ GithubEnv.develocityLinks)
.withValues(buildScan.values ++ GithubEnv.develocityValues)
.withObfuscation(buildScan.obfuscation.withIpAddresses(_.map(_ => "0.0.0.0")))
)
.withBuildCache(
buildCache
.withLocal(buildCache.local.withEnabled(false))
.withRemote(buildCache.remote.withEnabled(false))
)
}
)
Expand Down Expand Up @@ -910,7 +916,7 @@ object Build {
}.taskValue,

// Develocity's Build Cache does not work with our compilation tests
// at the moment.
// at the moment: it does not take compilation files as inputs.
Test / develocityBuildCacheClient := None,
)

Expand Down

0 comments on commit df43fa4

Please sign in to comment.