From 9874e063a0c7795bdae6859607674295ff5310e6 Mon Sep 17 00:00:00 2001 From: Daniil Smirnov Date: Sat, 15 Oct 2016 17:45:42 +0300 Subject: [PATCH 1/2] Adjust build.sbt to be dbuild-friendly --- build.sbt | 14 +++++++++++++- .../tools/selectivecps/SelectiveANFTransform.scala | 0 2 files changed, 13 insertions(+), 1 deletion(-) rename plugin/src/main/{scala-2.12.0-RC1 => scala-2.12}/scala/tools/selectivecps/SelectiveANFTransform.scala (100%) diff --git a/build.sbt b/build.sbt index 74b312c..407a346 100644 --- a/build.sbt +++ b/build.sbt @@ -22,7 +22,19 @@ lazy val commonSettings = scalaModuleSettings ++ Seq( scalacOptions ++= Seq( "-deprecation", "-feature") -) +) ++ crossVersionSharedSources + +lazy val crossVersionSharedSources: Seq[Setting[_]] = + Seq(Compile, Test).map { sc => + (unmanagedSourceDirectories in sc) ++= { + (unmanagedSourceDirectories in sc ).value.map { dir: File => + CrossVersion.partialVersion(scalaVersion.value) match { + case Some((2, y)) if y == 11 => new File(dir.getPath + "-2.11") + case Some((2, y)) if y == 12 => new File(dir.getPath + "-2.12") + } + } + } + } lazy val root = project.in( file(".") ).settings( publishArtifact := false ).aggregate(plugin, library).settings(commonSettings : _*) diff --git a/plugin/src/main/scala-2.12.0-RC1/scala/tools/selectivecps/SelectiveANFTransform.scala b/plugin/src/main/scala-2.12/scala/tools/selectivecps/SelectiveANFTransform.scala similarity index 100% rename from plugin/src/main/scala-2.12.0-RC1/scala/tools/selectivecps/SelectiveANFTransform.scala rename to plugin/src/main/scala-2.12/scala/tools/selectivecps/SelectiveANFTransform.scala From dbf56fb356002b197dfc8fa314e5006f036fb23c Mon Sep 17 00:00:00 2001 From: Daniil Smirnov Date: Sat, 15 Oct 2016 17:56:44 +0300 Subject: [PATCH 2/2] Bump to 2.12.0-RC2 --- build.sbt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index 407a346..7e9b41f 100644 --- a/build.sbt +++ b/build.sbt @@ -14,7 +14,7 @@ lazy val commonSettings = scalaModuleSettings ++ Seq( if (java.startsWith("1.6.") || java.startsWith("1.7.")) Seq("2.11.8") else if (java.startsWith("1.8.") || java.startsWith("1.9.")) - Seq("2.12.0-RC1") + Seq("2.12.0-RC2") else sys.error(s"don't know what Scala versions to build on $java") }, @@ -51,7 +51,6 @@ val pluginJar = packageTask in (plugin, Compile) lazy val library = project settings (scalaModuleOsgiSettings: _*) settings (MimaPlugin.mimaDefaultSettings: _*) settings ( name := "scala-continuations-library", MimaKeys.mimaPreviousArtifacts := Set( - organization.value % s"${name.value}_2.11.0-RC1" % "1.0.0", organization.value % s"${name.value}_2.11" % "1.0.2" ), scalacOptions ++= Seq(