Skip to content

Commit 0a075ba

Browse files
committed
chore: enable back the develocity build cache
1 parent eb1bb73 commit 0a075ba

File tree

1 file changed

+32
-2
lines changed

1 file changed

+32
-2
lines changed

project/Build.scala

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,8 @@ object Build {
287287
})
288288
.withBuildCache(
289289
buildCache
290-
.withLocal(buildCache.local.withEnabled(false).withStoreEnabled(false))
291-
.withRemote(buildCache.remote.withEnabled(false).withStoreEnabled(false))
290+
.withLocal(buildCache.local.withEnabled(true).withStoreEnabled(true))
291+
.withRemote(buildCache.remote.withEnabled(true).withStoreEnabled(isInsideCI))
292292
.withRequireClean(!isInsideCI)
293293
)
294294
.withTestRetry(
@@ -1478,6 +1478,9 @@ object Build {
14781478
scalaCompilerBridgeBinaryJar := {
14791479
Some((`scala3-sbt-bridge-nonbootstrapped` / Compile / packageBin).value)
14801480
},
1481+
// Force recomplilation when bootstrapped compiler changes
1482+
Compile / extraDevelocityCacheInputFiles ++=
1483+
(`scala3-compiler-nonbootstrapped` / Compile / fullClasspathAsJars).value.map(_.data.toPath)
14811484
)
14821485

14831486
/* Configuration of the org.scala-lang:scala3-staging:*.**.**-bootstrapped project */
@@ -1536,6 +1539,9 @@ object Build {
15361539
scalaCompilerBridgeBinaryJar := {
15371540
Some((`scala3-sbt-bridge-nonbootstrapped` / Compile / packageBin).value)
15381541
},
1542+
// Force recomplilation when bootstrapped compiler changes
1543+
Compile / extraDevelocityCacheInputFiles ++=
1544+
(`scala3-compiler-nonbootstrapped` / Compile / fullClasspathAsJars).value.map(_.data.toPath)
15391545
)
15401546

15411547
/* Configuration of the org.scala-lang:scala3-tasty-inspector:*.**.**-bootstrapped project */
@@ -1594,6 +1600,9 @@ object Build {
15941600
scalaCompilerBridgeBinaryJar := {
15951601
Some((`scala3-sbt-bridge-nonbootstrapped` / Compile / packageBin).value)
15961602
},
1603+
// Force recomplilation when bootstrapped compiler changes
1604+
Compile / extraDevelocityCacheInputFiles ++=
1605+
(`scala3-compiler-nonbootstrapped` / Compile / fullClasspathAsJars).value.map(_.data.toPath)
15971606
)
15981607

15991608
// ==============================================================================================
@@ -1771,6 +1780,9 @@ object Build {
17711780
mimaForwardIssueFilters := MiMaFilters.Scala3Library.ForwardsBreakingChanges,
17721781
mimaBackwardIssueFilters := MiMaFilters.Scala3Library.BackwardsBreakingChanges,
17731782
customMimaReportBinaryIssues("MiMaFilters.Scala3Library"),
1783+
// Force recomplilation when bootstrapped compiler changes
1784+
Compile / extraDevelocityCacheInputFiles ++=
1785+
(`scala3-compiler-nonbootstrapped` / Compile / fullClasspathAsJars).value.map(_.data.toPath)
17741786
)
17751787

17761788
/* Configuration of the org.scala-lang:scala3-library_3:*.**.**-bootstrapped project */
@@ -1812,6 +1824,9 @@ object Build {
18121824
publish / skip := false,
18131825
// Project specific target folder. sbt doesn't like having two projects using the same target folder
18141826
target := target.value / "scala3-library-bootstrapped",
1827+
// Force recomplilation when bootstrapped compiler changes
1828+
Compile / extraDevelocityCacheInputFiles ++=
1829+
(`scala3-compiler-nonbootstrapped` / Compile / fullClasspathAsJars).value.map(_.data.toPath)
18151830
)
18161831

18171832
/* Configuration of the org.scala-js:scalajs-scalalib_2.13:*.**.**-bootstrapped project */
@@ -1925,6 +1940,9 @@ object Build {
19251940
}
19261941
}).transform(node).head
19271942
},
1943+
// Force recomplilation when bootstrapped compiler changes
1944+
Compile / extraDevelocityCacheInputFiles ++=
1945+
(`scala3-compiler-nonbootstrapped` / Compile / fullClasspathAsJars).value.map(_.data.toPath)
19281946
)
19291947

19301948
/* Configuration of the org.scala-lang:scala3-library_sjs1_3:*.**.**-bootstrapped project */
@@ -1966,6 +1984,9 @@ object Build {
19661984
publish / skip := false,
19671985
// Project specific target folder. sbt doesn't like having two projects using the same target folder
19681986
target := target.value / "scala3-library",
1987+
// Force recomplilation when bootstrapped compiler changes
1988+
Compile / extraDevelocityCacheInputFiles ++=
1989+
(`scala3-compiler-nonbootstrapped` / Compile / fullClasspathAsJars).value.map(_.data.toPath)
19691990
)
19701991

19711992
// ==============================================================================================
@@ -2104,6 +2125,9 @@ object Build {
21042125
mimaForwardIssueFilters := MiMaFilters.TastyCore.ForwardsBreakingChanges,
21052126
mimaBackwardIssueFilters := MiMaFilters.TastyCore.BackwardsBreakingChanges,
21062127
customMimaReportBinaryIssues("MiMaFilters.TastyCore"),
2128+
// Force recomplilation when bootstrapped compiler changes
2129+
Compile / extraDevelocityCacheInputFiles ++=
2130+
(`scala3-compiler-nonbootstrapped` / Compile / fullClasspathAsJars).value.map(_.data.toPath)
21072131
)
21082132

21092133
// ==============================================================================================
@@ -2453,6 +2477,9 @@ object Build {
24532477
s"-Ddotty.tools.dotc.semanticdb.test=${(ThisBuild / baseDirectory).value/"tests"/"semanticdb"}",
24542478
)
24552479
},
2480+
// Force recomplilation when bootstrapped compiler changes
2481+
Compile / extraDevelocityCacheInputFiles ++=
2482+
(`scala3-compiler-nonbootstrapped` / Compile / fullClasspathAsJars).value.map(_.data.toPath)
24562483
)
24572484

24582485
// ==============================================================================================
@@ -2534,6 +2561,9 @@ object Build {
25342561
scalaCompilerBridgeBinaryJar := {
25352562
Some((`scala3-sbt-bridge-nonbootstrapped` / Compile / packageBin).value)
25362563
},
2564+
// Force recomplilation when bootstrapped compiler changes
2565+
Compile / extraDevelocityCacheInputFiles ++=
2566+
(`scala3-compiler-nonbootstrapped` / Compile / fullClasspathAsJars).value.map(_.data.toPath)
25372567
)
25382568

25392569
def dottyLibrary(implicit mode: Mode): Project = mode match {

0 commit comments

Comments
 (0)