Skip to content

Commit a0ead77

Browse files
committed
add managedSources to packageSrc / mappings
1 parent 14d0f50 commit a0ead77

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

project/DottyBuild.scala

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,14 @@ trait DottyBuild { this: BuildCommons =>
9191
|import Matchers._""".stripMargin,
9292
libraryDependencies ++= scalaXmlDependency(scalaVersion.value),
9393
libraryDependencies ++= scalatestLibraryDependencies,
94+
// https://github.com/sbt/sbt/issues/2205#issuecomment-144375501
95+
mappings in (Compile, packageSrc) ++= { // publish generated sources
96+
val srcs = (managedSources in Compile).value
97+
val sdirs = (managedSourceDirectories in Compile).value
98+
val base = baseDirectory.value
99+
import Path._
100+
(srcs --- sdirs --- base) pair (relativeTo(sdirs) | relativeTo(base) | flat)
101+
},
94102
sourceGenerators in Compile += {
95103
Def.task {
96104
GenScalaTestDotty.genScala((sourceManaged in Compile).value, version.value, scalaVersion.value) ++

0 commit comments

Comments
 (0)