Skip to content

cross build to 2.13 #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 27 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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
71 changes: 34 additions & 37 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -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:[email protected]: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 = "[email protected]",
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(
Expand All @@ -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 :=
<url>https://github.com/lihaoyi/sourcecode</url>
<licenses>
<license>
<name>MIT license</name>
<url>http://www.opensource.org/licenses/mit-license.php</url>
</license>
</licenses>
<scm>
<url>git://github.com/lihaoyi/sourcecode.git</url>
<connection>scm:git://github.com/lihaoyi/sourcecode.git</connection>
</scm>
<developers>
<developer>
<id>lihaoyi</id>
<name>Li Haoyi</name>
<url>https://github.com/lihaoyi</url>
</developer>
</developers>
)
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
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=0.13.13
sbt.version=0.13.15
2 changes: 1 addition & 1 deletion project/build.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.13")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.16")