Skip to content

Commit 00d2bf0

Browse files
committed
Make sure the community build runs with the correct ivy cache
This is necessary for the community build to work on the CI now that we run the community build with fork in Test set to true.
1 parent 9010a4b commit 00d2bf0

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

project/Build.scala

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1101,7 +1101,18 @@ object Build {
11011101
"--include-categories=dotty.communitybuild.TestCategory",
11021102
),
11031103
(Test / testOnly) := ((Test / testOnly) dependsOn prepareCommunityBuild).evaluated,
1104-
(Test / test ) := ((Test / test ) dependsOn prepareCommunityBuild).value
1104+
(Test / test ) := ((Test / test ) dependsOn prepareCommunityBuild).value,
1105+
javaOptions ++= {
1106+
// Propagate the ivy cache directory setting to the tests, which will
1107+
// then propagate it further to the sbt instances they will spawn.
1108+
val sbtProps = Option(System.getProperty("sbt.ivy.home")) match {
1109+
case Some(ivyHome) =>
1110+
Seq(s"-Dsbt.ivy.home=$ivyHome")
1111+
case _ =>
1112+
Seq()
1113+
}
1114+
sbtProps
1115+
}
11051116
)
11061117

11071118
lazy val publishSettings = Seq(

0 commit comments

Comments
 (0)