so I have a git sub-module that I want to include some Scala files from in my project but I don't want to include the a whole directory just some specific Scala files who to change the following line or what to add in order to include some specific Scala files to the build.sbt
unmanagedSourceDirectories in Compile ++= addons.value.map(baseDirectory.value / _ /"")
Remove command unmanagedSourceDirectories in Compile ++=...
and add command
sources in Compile ++= Seq("SpecificFile1.scala", "SpecificFile2.scala")
.map(baseDirectory.value / "external_directory" / _)
if you want to add only external_directory/SpecificFile1.scala
, external_directory/SpecificFile2.scala
.
Or keep command unmanagedSourceDirectories in Compile += baseDirectory.value / "external_directory"
and add command
sources in Compile --= Seq("ExcludedSpecificFile1.scala", "ExcludedSpecificFile2.scala")
.map(baseDirectory.value / "external_directory" / _)
if you want to add everything from external_directory
except external_directory/ExcludedSpecificFile1.scala
, external_directory/ExcludedSpecificFile2.scala
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.