diff --git a/.travis.yml b/.travis.yml index fff3df2..e3a2e9a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,15 +1,32 @@ language: scala -script: - - sbt ++$TRAVIS_SCALA_VERSION sourcecodeJVM/test:run sourcecodeJS/test:run -scala: - - 2.10.6 - - 2.11.8 - - 2.12.0 + +sudo: required + +dist: trusty + jdk: - - openjdk7 - oraclejdk8 +scala: + - 2.10.6 + - 2.11.11 + - 2.12.2 + - 2.13.0-M1 matrix: - exclude: - - scala: 2.12.0 + include: + - scala: 2.10.6 jdk: openjdk7 -sudo: false + +# Taken from https://github.com/typelevel/cats/blob/master/.travis.yml +cache: + directories: + - $HOME/.sbt/0.13/dependency + - $HOME/.sbt/boot/scala* + - $HOME/.sbt/launchers + - $HOME/.ivy2/cache + - $HOME/.nvm + +before_cache: + - du -h -d 1 $HOME/.ivy2/cache + - du -h -d 2 $HOME/.sbt/ + - find $HOME/.sbt -name "*.lock" -type f -delete + - find $HOME/.ivy2/cache -name "ivydata-*.properties" -type f -delete \ No newline at end of file diff --git a/build.sbt b/build.sbt index e82cd12..a2aab99 100644 --- a/build.sbt +++ b/build.sbt @@ -1,5 +1,24 @@ +val baseSettings = Seq( + organization := "com.lihaoyi", + name := "sourcecode", + version := "0.1.4", + scalaVersion := "2.11.11", + crossScalaVersions := Seq("2.10.6", "2.11.11", "2.12.2", "2.13.0-M1"), + scmInfo := Some(ScmInfo( + browseUrl = url("https://github.com/lihaoyi/sourcecode"), + connection = "scm:git:git@github.com:lihaoyi/sourcecode.git" + )), + homepage := Some(url("https://github.com/lihaoyi/sourcecode")), + licenses := Seq("MIT" -> url("http://www.opensource.org/licenses/mit-license.html")), + developers += Developer( + email = "haoyi.sg@gmail.com", + id = "lihaoyi", + name = "Li Haoyi", + url = url("https://github.com/lihaoyi") + ) +) -crossScalaVersions := Seq("2.10.6", "2.11.8", "2.12.0") +baseSettings def macroDependencies(version: String) = Seq( @@ -12,42 +31,20 @@ def macroDependencies(version: String) = else Seq()) -lazy val sourcecode = crossProject.settings( - version := "0.1.3", - scalaVersion := "2.11.8", - name := "sourcecode" , - organization := "com.lihaoyi", - libraryDependencies ++= macroDependencies(scalaVersion.value), - unmanagedSourceDirectories in Compile ++= { - CrossVersion.partialVersion(scalaVersion.value) match { - case Some((2, n)) if n >= 12 => - Seq(baseDirectory.value / ".."/"shared"/"src"/ "main" / "scala-2.11") - case _ => - Seq() - } - }, - publishTo := Some("releases" at "https://oss.sonatype.org/service/local/staging/deploy/maven2"), - - pomExtra := - https://github.com/lihaoyi/sourcecode - - - MIT license - http://www.opensource.org/licenses/mit-license.php - - - - git://github.com/lihaoyi/sourcecode.git - scm:git://github.com/lihaoyi/sourcecode.git - - - - lihaoyi - Li Haoyi - https://github.com/lihaoyi - - -) +lazy val sourcecode = crossProject + .settings(baseSettings) + .settings( + libraryDependencies ++= macroDependencies(scalaVersion.value), + unmanagedSourceDirectories in Compile ++= { + CrossVersion.partialVersion(scalaVersion.value) match { + case Some((2, n)) if n >= 12 => + Seq(baseDirectory.value / ".." / "shared" / "src" / "main" / "scala-2.11") + case _ => + Seq() + } + }, + publishTo := Some("releases" at "https://oss.sonatype.org/service/local/staging/deploy/maven2") + ) lazy val js = sourcecode.js lazy val jvm = sourcecode.jvm diff --git a/project/build.properties b/project/build.properties index 27e88aa..64317fd 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.13 +sbt.version=0.13.15 diff --git a/project/build.sbt b/project/build.sbt index bfdab78..f48079a 100644 --- a/project/build.sbt +++ b/project/build.sbt @@ -1 +1 @@ -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.13") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.16")