From 034eb26af9a91074b4c54030678a3746d6819a41 Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Tue, 20 Aug 2013 12:02:15 -0700 Subject: [PATCH 1/2] Scala 2.11 modules now under org.scala-lang.modules Using 1.0-RC2 for scala-xml, 1.0-RC1 for scala-parser-combinators. --- project/Util.scala | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/project/Util.scala b/project/Util.scala index a5b0cbb4f..4d79d78a7 100644 --- a/project/Util.scala +++ b/project/Util.scala @@ -174,11 +174,13 @@ object Common lazy val sbinary = libraryDependencies <+= Util.nightly211(n => "org.scala-tools.sbinary" % "sbinary" % "0.4.2" cross(if(n) CrossVersion.full else CrossVersion.binary)) lazy val scalaCompiler = libraryDependencies <+= scalaVersion("org.scala-lang" % "scala-compiler" % _ ) lazy val testInterface = lib("org.scala-sbt" % "test-interface" % "1.0") - def libModular(name: String) = libraryDependencies <++= (scalaVersion, scalaOrganization)( (sv,o) => - if(sv.startsWith("2.11.")) (o % name % sv) :: Nil else Nil - ) - lazy val scalaXml = libModular("scala-xml") - lazy val scalaParsers = libModular("scala-parser-combinators") + private def scala211Module(name: String, moduleVersion: String) = + libraryDependencies <++= (scalaVersion)( scalaVersion => + if (scalaVersion startsWith "2.11.") ("org.scala-lang.modules" %% name % moduleVersion) :: Nil + else Nil + ) + lazy val scalaXml = scala211Module("scala-xml", "1.0-RC2") + lazy val scalaParsers = scala211Module("scala-parser-combinators", "1.0-RC1") } object Licensed { From ff0fd6eec658502f276f89c46f4aba0e0e268ddc Mon Sep 17 00:00:00 2001 From: Grzegorz Kossakowski Date: Sat, 18 Jan 2014 01:09:24 +0100 Subject: [PATCH 2/2] Update dependencies to Scala 2.11.0-M7. I had to sprinkle some excludes due to dependency of scala-compiler M7 on M6 modules. Those excludes won't be needed by the time M8 is out. --- project/Sbt.scala | 4 ++-- project/Util.scala | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/project/Sbt.scala b/project/Sbt.scala index 83a85259e..800ef4a5d 100644 --- a/project/Sbt.scala +++ b/project/Sbt.scala @@ -276,7 +276,7 @@ object Sbt extends Build artifact in (Compile, packageSrc) := Artifact(srcID).copy(configurations = Compile :: Nil).extra("e:component" -> srcID) ) def compilerSettings = Seq( - libraryDependencies <+= scalaVersion( "org.scala-lang" % "scala-compiler" % _ % "test"), + libraryDependencies <+= scalaVersion( "org.scala-lang" % "scala-compiler" % _ % "test" excludeAll(ExclusionRule(organization = "org.scala-lang.modules"))), unmanagedJars in Test <<= (packageSrc in compileInterfaceSub in Compile).map(x => Seq(x).classpath) ) def precompiled(scalav: String): Project = baseProject(compilePath / "interface", "Precompiled " + scalav.replace('.', '_')) dependsOn(interfaceSub) settings(precompiledSettings : _*) settings( @@ -290,6 +290,6 @@ object Sbt extends Build sources in Test := Nil ) def ioSettings: Seq[Setting[_]] = Seq( - libraryDependencies <+= scalaVersion("org.scala-lang" % "scala-compiler" % _ % "test") + libraryDependencies <+= scalaVersion("org.scala-lang" % "scala-compiler" % _ % "test" excludeAll(ExclusionRule(organization = "org.scala-lang.modules"))) ) } diff --git a/project/Util.scala b/project/Util.scala index 4d79d78a7..61c58ab54 100644 --- a/project/Util.scala +++ b/project/Util.scala @@ -172,15 +172,16 @@ object Common lazy val httpclient = lib("commons-httpclient" % "commons-httpclient" % "3.1") lazy val jsch = lib("com.jcraft" % "jsch" % "0.1.46" intransitive() ) lazy val sbinary = libraryDependencies <+= Util.nightly211(n => "org.scala-tools.sbinary" % "sbinary" % "0.4.2" cross(if(n) CrossVersion.full else CrossVersion.binary)) - lazy val scalaCompiler = libraryDependencies <+= scalaVersion("org.scala-lang" % "scala-compiler" % _ ) + lazy val scalaCompiler = libraryDependencies <+= scalaVersion( + sv => "org.scala-lang" % "scala-compiler" % sv excludeAll(ExclusionRule(organization = "org.scala-lang.modules"))) lazy val testInterface = lib("org.scala-sbt" % "test-interface" % "1.0") private def scala211Module(name: String, moduleVersion: String) = libraryDependencies <++= (scalaVersion)( scalaVersion => if (scalaVersion startsWith "2.11.") ("org.scala-lang.modules" %% name % moduleVersion) :: Nil else Nil ) - lazy val scalaXml = scala211Module("scala-xml", "1.0-RC2") - lazy val scalaParsers = scala211Module("scala-parser-combinators", "1.0-RC1") + lazy val scalaXml = scala211Module("scala-xml", "1.0.0-RC7") + lazy val scalaParsers = scala211Module("scala-parser-combinators", "1.0.0-RC5") } object Licensed {