Skip to content

Commit

Permalink
Dedup src diffs between 2.10 & 2.11+
Browse files Browse the repository at this point in the history
Fixes #233
  • Loading branch information
dwijnand committed Feb 27, 2017
1 parent d532d15 commit bb94aee
Show file tree
Hide file tree
Showing 28 changed files with 84 additions and 2,295 deletions.
14 changes: 8 additions & 6 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -267,16 +267,18 @@ lazy val compilerBridge: Project = (project in internalPath / "compiler-bridge")
// needed because we fork tests and tests are ran in parallel so we have multiple Scala
// compiler instances that are memory hungry
javaOptions in Test += "-Xmx1G",
scalaSource in Compile := {
scalaVersion.value match {
case v if v startsWith "2.10" => baseDirectory.value / "src-2.10" / "main" / "scala"
case _ => baseDirectory.value / "src" / "main" / "scala"
}
},
inBoth(unmanagedSourceDirectories ++= scalaPartialVersion.value.collect {
case (2, y) if y == 10 => new File(scalaSource.value.getPath + "_2.10")
case (2, y) if y >= 11 => new File(scalaSource.value.getPath + "_2.11+")
}.toList),
altPublishSettings
).
configure(addSbtIO, addSbtUtilLogging)

val scalaPartialVersion = Def setting (CrossVersion partialVersion scalaVersion.value)

def inBoth(ss: Setting[_]*): Seq[Setting[_]] = Seq(Compile, Test) flatMap (inConfig(_)(ss))

// defines operations on the API of a source, including determining whether it has changed and converting it to a string
// and discovery of Projclasses and annotations
lazy val zincApiInfo = (project in internalPath / "zinc-apiinfo").
Expand Down
85 changes: 0 additions & 85 deletions internal/compiler-bridge/src-2.10/main/scala/xsbt/API.scala

This file was deleted.

60 changes: 0 additions & 60 deletions internal/compiler-bridge/src-2.10/main/scala/xsbt/Analyzer.scala

This file was deleted.

56 changes: 0 additions & 56 deletions internal/compiler-bridge/src-2.10/main/scala/xsbt/ClassName.scala

This file was deleted.

28 changes: 0 additions & 28 deletions internal/compiler-bridge/src-2.10/main/scala/xsbt/Command.scala

This file was deleted.

Loading

0 comments on commit bb94aee

Please sign in to comment.