Skip to content

Commit ffc423a

Browse files
committed
Make the sbt scripted tests use the caching resolver
The CI is setup to have https://github.com/lampepfl/dotty-drone/blob/master/dotty-docker/repositories as ~/.sbt/repositories to avoid hitting sonatype when an artifact is not present in the local cache, the sbt scripted tests were not respecting that setting so far because they use a different sbt boot directory.
1 parent a356535 commit ffc423a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

project/Build.scala

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,8 +1041,12 @@ object Build {
10411041
"-Dplugin.scalaVersion=" + dottyVersion,
10421042
"-Dsbt.boot.directory=" + ((baseDirectory in ThisBuild).value / ".sbt-scripted").getAbsolutePath // Workaround sbt/sbt#3469
10431043
),
1044-
// Pass along ivy home setting to sbt instances run from the tests
1045-
scriptedLaunchOpts ++= ivyPaths.value.ivyHome.map("-Dsbt.ivy.home=" + _.getAbsolutePath).toList,
1044+
// Pass along ivy home and repositories settings to sbt instances run from the tests
1045+
scriptedLaunchOpts ++= {
1046+
val repositoryPath = (io.Path.userHome / ".sbt" / "repositories").absolutePath
1047+
s"-Dsbt.repository.config=$repositoryPath" ::
1048+
ivyPaths.value.ivyHome.map("-Dsbt.ivy.home=" + _.getAbsolutePath).toList
1049+
},
10461050
scriptedBufferLog := true,
10471051
scripted := scripted.dependsOn(
10481052
publishLocal in `dotty-sbt-bridge`,

0 commit comments

Comments
 (0)