Skip to content
This repository was archived by the owner on Jun 23, 2020. It is now read-only.

Commit 3398d06

Browse files
authored
Merge pull request #24 from danslapman/master
Adjust build.sbt to be dbuild-friendly
2 parents 6106800 + dbf56fb commit 3398d06

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

build.sbt

+14-3
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,27 @@ lazy val commonSettings = scalaModuleSettings ++ Seq(
1414
if (java.startsWith("1.6.") || java.startsWith("1.7."))
1515
Seq("2.11.8")
1616
else if (java.startsWith("1.8.") || java.startsWith("1.9."))
17-
Seq("2.12.0-RC1")
17+
Seq("2.12.0-RC2")
1818
else
1919
sys.error(s"don't know what Scala versions to build on $java")
2020
},
2121
snapshotScalaBinaryVersion := "2.11.8",
2222
scalacOptions ++= Seq(
2323
"-deprecation",
2424
"-feature")
25-
)
25+
) ++ crossVersionSharedSources
26+
27+
lazy val crossVersionSharedSources: Seq[Setting[_]] =
28+
Seq(Compile, Test).map { sc =>
29+
(unmanagedSourceDirectories in sc) ++= {
30+
(unmanagedSourceDirectories in sc ).value.map { dir: File =>
31+
CrossVersion.partialVersion(scalaVersion.value) match {
32+
case Some((2, y)) if y == 11 => new File(dir.getPath + "-2.11")
33+
case Some((2, y)) if y == 12 => new File(dir.getPath + "-2.12")
34+
}
35+
}
36+
}
37+
}
2638

2739
lazy val root = project.in( file(".") ).settings( publishArtifact := false ).aggregate(plugin, library).settings(commonSettings : _*)
2840

@@ -39,7 +51,6 @@ val pluginJar = packageTask in (plugin, Compile)
3951
lazy val library = project settings (scalaModuleOsgiSettings: _*) settings (MimaPlugin.mimaDefaultSettings: _*) settings (
4052
name := "scala-continuations-library",
4153
MimaKeys.mimaPreviousArtifacts := Set(
42-
organization.value % s"${name.value}_2.11.0-RC1" % "1.0.0",
4354
organization.value % s"${name.value}_2.11" % "1.0.2"
4455
),
4556
scalacOptions ++= Seq(

0 commit comments

Comments
 (0)