File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -887,22 +887,28 @@ object Build {
887887
888888 // NOTE `sourceDirectory` is used for actual copying,
889889 // 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+ }
892894
893895 val cachedFun = FileFunction .cached(
894896 cacheDir / s " copyDottyLibrarySrc " ,
895897 FilesInfo .lastModified,
896898 FilesInfo .exists,
897899 ) { _ =>
898- s.log.info(s " Copying scala3-library sources from $dottyLibSourceDir to $trgDir... " )
899900 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+ }
901907
902908 ((trgDir ** " *.scala" ) +++ (trgDir ** " *.java" )).get.toSet
903909 }
904910
905- cachedFun(dottyLibSources.toSet).toSeq
911+ cachedFun(dottyLibSources.get. toSet).toSeq
906912 }.taskValue,
907913 sources in Compile ~= (_.filterNot(file =>
908914 // 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