@@ -14,15 +14,27 @@ lazy val commonSettings = scalaModuleSettings ++ Seq(
14
14
if (java.startsWith(" 1.6." ) || java.startsWith(" 1.7." ))
15
15
Seq (" 2.11.8" )
16
16
else if (java.startsWith(" 1.8." ) || java.startsWith(" 1.9." ))
17
- Seq (" 2.12.0-RC1 " )
17
+ Seq (" 2.12.0-RC2 " )
18
18
else
19
19
sys.error(s " don't know what Scala versions to build on $java" )
20
20
},
21
21
snapshotScalaBinaryVersion := " 2.11.8" ,
22
22
scalacOptions ++= Seq (
23
23
" -deprecation" ,
24
24
" -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
+ }
26
38
27
39
lazy val root = project.in( file(" ." ) ).settings( publishArtifact := false ).aggregate(plugin, library).settings(commonSettings : _* )
28
40
@@ -39,7 +51,6 @@ val pluginJar = packageTask in (plugin, Compile)
39
51
lazy val library = project settings (scalaModuleOsgiSettings : _* ) settings (MimaPlugin .mimaDefaultSettings: _* ) settings (
40
52
name := " scala-continuations-library" ,
41
53
MimaKeys .mimaPreviousArtifacts := Set (
42
- organization.value % s " ${name.value}_2.11.0-RC1 " % " 1.0.0" ,
43
54
organization.value % s " ${name.value}_2.11 " % " 1.0.2"
44
55
),
45
56
scalacOptions ++= Seq (
0 commit comments