diff --git a/.travis.yml b/.travis.yml index 87a63b0..fff3df2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,15 @@ language: scala script: -- sbt ++$TRAVIS_SCALA_VERSION sourcecodeJVM/test:run sourcecodeJS/test:run + - sbt ++$TRAVIS_SCALA_VERSION sourcecodeJVM/test:run sourcecodeJS/test:run scala: - - 2.10.4 - - 2.11.7 + - 2.10.6 + - 2.11.8 + - 2.12.0 +jdk: + - openjdk7 + - oraclejdk8 +matrix: + exclude: + - scala: 2.12.0 + jdk: openjdk7 sudo: false diff --git a/build.sbt b/build.sbt index 18d83d9..815f653 100644 --- a/build.sbt +++ b/build.sbt @@ -1,5 +1,5 @@ -crossScalaVersions := Seq("2.10.4", "2.11.7") +crossScalaVersions := Seq("2.10.6", "2.11.8", "2.12.0") def macroDependencies(version: String) = Seq( @@ -7,20 +7,20 @@ def macroDependencies(version: String) = "org.scala-lang" % "scala-compiler" % version % "provided" ) ++ (if (version startsWith "2.10.") - Seq(compilerPlugin("org.scalamacros" % s"paradise" % "2.0.0" cross CrossVersion.full), - "org.scalamacros" %% s"quasiquotes" % "2.0.0") + Seq(compilerPlugin("org.scalamacros" % s"paradise" % "2.1.0" cross CrossVersion.full), + "org.scalamacros" %% s"quasiquotes" % "2.1.0") else Seq()) lazy val sourcecode = crossProject.settings( - version := "0.1.2", - scalaVersion := "2.11.7", + version := "0.1.3", + scalaVersion := "2.11.8", name := "sourcecode" , organization := "com.lihaoyi", libraryDependencies ++= macroDependencies(scalaVersion.value), unmanagedSourceDirectories in Compile ++= { - if (scalaVersion.value startsWith "2.10.") Seq(baseDirectory.value / ".."/"shared"/"src"/ "main" / "scala-2.10") - else Seq(baseDirectory.value / ".."/"shared" / "src" / "main" / "scala-2.11") + if (scalaVersion.value startsWith "2.12.") Seq(baseDirectory.value / ".."/"shared"/"src"/ "main" / "scala-2.11") + else Seq() }, publishTo := Some("releases" at "https://oss.sonatype.org/service/local/staging/deploy/maven2"), diff --git a/project/build.properties b/project/build.properties index 817bc38..35c88ba 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.9 +sbt.version=0.13.12 diff --git a/project/build.sbt b/project/build.sbt index 448bc06..bfdab78 100644 --- a/project/build.sbt +++ b/project/build.sbt @@ -1 +1 @@ -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.6") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.13") diff --git a/sourcecode/shared/src/test/scala/sourcecode/Apply.scala b/sourcecode/shared/src/test/scala/sourcecode/Apply.scala index ef52cd4..f07eb39 100644 --- a/sourcecode/shared/src/test/scala/sourcecode/Apply.scala +++ b/sourcecode/shared/src/test/scala/sourcecode/Apply.scala @@ -35,7 +35,10 @@ object Apply { assert(line == 34) val enclosing = sourcecode.Enclosing() - assert(enclosing == "sourcecode.Apply.applyRun myLazy$lzy Bar#enclosing") + assert( + (enclosing == "sourcecode.Apply.applyRun myLazy$lzy Bar#enclosing") || + (enclosing == "sourcecode.Apply.applyRun myLazy Bar#enclosing") // encoding changed in Scala 2.12 + ) } val b = new Bar{} } diff --git a/sourcecode/shared/src/test/scala/sourcecode/Implicits.scala b/sourcecode/shared/src/test/scala/sourcecode/Implicits.scala index 54ceef8..16cf7fc 100644 --- a/sourcecode/shared/src/test/scala/sourcecode/Implicits.scala +++ b/sourcecode/shared/src/test/scala/sourcecode/Implicits.scala @@ -35,7 +35,10 @@ object Implicits { assert(line.value == 34) val enclosing = implicitly[sourcecode.Enclosing] - assert(enclosing.value == "sourcecode.Implicits.implicitRun myLazy$lzy Bar#enclosing") + assert( + (enclosing.value == "sourcecode.Implicits.implicitRun myLazy$lzy Bar#enclosing") || + (enclosing.value == "sourcecode.Implicits.implicitRun myLazy Bar#enclosing") // encoding changed in Scala 2.12 + ) } val b = new Bar{} }