File tree 1 file changed +11
-5
lines changed
1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -887,22 +887,28 @@ object Build {
887
887
888
888
// NOTE `sourceDirectory` is used for actual copying,
889
889
// but `sources` are used as cache keys
890
- val dottyLibSourceDir = (`scala3-library-bootstrapped`/ sourceDirectory).value
891
- val dottyLibSources = (`scala3-library-bootstrapped`/ Compile / sources).value
890
+ val dottyLibSourceDirs = (`scala3-library-bootstrapped`/ Compile / unmanagedSourceDirectories).value
891
+ def dottyLibSources = dottyLibSourceDirs.foldLeft(PathFinder .empty) { (pf, dir) =>
892
+ if (! dir.exists) pf else pf +++ (dir ** " *.scala" ) +++ (dir ** " *.java" )
893
+ }
892
894
893
895
val cachedFun = FileFunction .cached(
894
896
cacheDir / s " copyDottyLibrarySrc " ,
895
897
FilesInfo .lastModified,
896
898
FilesInfo .exists,
897
899
) { _ =>
898
- s.log.info(s " Copying scala3-library sources from $dottyLibSourceDir to $trgDir... " )
899
900
if (trgDir.exists) IO .delete(trgDir)
900
- IO .copyDirectory(dottyLibSourceDir, trgDir)
901
+ dottyLibSourceDirs.foreach { dir =>
902
+ if (dir.exists) {
903
+ s.log.info(s " Copying scala3-library sources from $dir to $trgDir... " )
904
+ IO .copyDirectory(dir, trgDir)
905
+ }
906
+ }
901
907
902
908
((trgDir ** " *.scala" ) +++ (trgDir ** " *.java" )).get.toSet
903
909
}
904
910
905
- cachedFun(dottyLibSources.toSet).toSeq
911
+ cachedFun(dottyLibSources.get. toSet).toSeq
906
912
}.taskValue,
907
913
sources in Compile ~= (_.filterNot(file =>
908
914
// sources from https://github.com/scala/scala/tree/2.13.x/src/library-aux
You can’t perform that action at this time.
0 commit comments