Skip to content

Commit d72c4c0

Browse files
cross build to 2.13
1 parent 43e7d43 commit d72c4c0

File tree

4 files changed

+63
-49
lines changed

4 files changed

+63
-49
lines changed

.travis.yml

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,32 @@
11
language: scala
2-
script:
3-
- sbt ++$TRAVIS_SCALA_VERSION sourcecodeJVM/test:run sourcecodeJS/test:run
4-
scala:
5-
- 2.10.6
6-
- 2.11.8
7-
- 2.12.0
2+
3+
sudo: required
4+
5+
dist: trusty
6+
87
jdk:
9-
- openjdk7
108
- oraclejdk8
9+
scala:
10+
- 2.10.6
11+
- 2.11.11
12+
- 2.12.2
13+
- 2.13.0-M1
1114
matrix:
12-
exclude:
13-
- scala: 2.12.0
15+
include:
16+
- scala: 2.10.6
1417
jdk: openjdk7
15-
sudo: false
18+
19+
# Taken from https://github.com/typelevel/cats/blob/master/.travis.yml
20+
cache:
21+
directories:
22+
- $HOME/.sbt/0.13/dependency
23+
- $HOME/.sbt/boot/scala*
24+
- $HOME/.sbt/launchers
25+
- $HOME/.ivy2/cache
26+
- $HOME/.nvm
27+
28+
before_cache:
29+
- du -h -d 1 $HOME/.ivy2/cache
30+
- du -h -d 2 $HOME/.sbt/
31+
- find $HOME/.sbt -name "*.lock" -type f -delete
32+
- find $HOME/.ivy2/cache -name "ivydata-*.properties" -type f -delete

build.sbt

Lines changed: 34 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
1+
val baseSettings = Seq(
2+
organization := "com.lihaoyi",
3+
name := "sourcecode",
4+
version := "0.1.4",
5+
scalaVersion := "2.11.11",
6+
crossScalaVersions := Seq("2.10.6", "2.11.11", "2.12.2", "2.13.0-M1"),
7+
scmInfo := Some(ScmInfo(
8+
browseUrl = url("https://github.com/lihaoyi/sourcecode"),
9+
connection = "scm:git:[email protected]:lihaoyi/sourcecode.git"
10+
)),
11+
homepage := Some(url("https://github.com/lihaoyi/sourcecode")),
12+
licenses := Seq("MIT" -> url("http://www.opensource.org/licenses/mit-license.html")),
13+
developers += Developer(
14+
email = "[email protected]",
15+
id = "lihaoyi",
16+
name = "Li Haoyi",
17+
url = url("https://github.com/lihaoyi")
18+
)
19+
)
120

2-
crossScalaVersions := Seq("2.10.6", "2.11.8", "2.12.0")
21+
baseSettings
322

423
def macroDependencies(version: String) =
524
Seq(
@@ -12,42 +31,20 @@ def macroDependencies(version: String) =
1231
else
1332
Seq())
1433

15-
lazy val sourcecode = crossProject.settings(
16-
version := "0.1.3",
17-
scalaVersion := "2.11.8",
18-
name := "sourcecode" ,
19-
organization := "com.lihaoyi",
20-
libraryDependencies ++= macroDependencies(scalaVersion.value),
21-
unmanagedSourceDirectories in Compile ++= {
22-
CrossVersion.partialVersion(scalaVersion.value) match {
23-
case Some((2, n)) if n >= 12 =>
24-
Seq(baseDirectory.value / ".."/"shared"/"src"/ "main" / "scala-2.11")
25-
case _ =>
26-
Seq()
27-
}
28-
},
29-
publishTo := Some("releases" at "https://oss.sonatype.org/service/local/staging/deploy/maven2"),
30-
31-
pomExtra :=
32-
<url>https://github.com/lihaoyi/sourcecode</url>
33-
<licenses>
34-
<license>
35-
<name>MIT license</name>
36-
<url>http://www.opensource.org/licenses/mit-license.php</url>
37-
</license>
38-
</licenses>
39-
<scm>
40-
<url>git://github.com/lihaoyi/sourcecode.git</url>
41-
<connection>scm:git://github.com/lihaoyi/sourcecode.git</connection>
42-
</scm>
43-
<developers>
44-
<developer>
45-
<id>lihaoyi</id>
46-
<name>Li Haoyi</name>
47-
<url>https://github.com/lihaoyi</url>
48-
</developer>
49-
</developers>
50-
)
34+
lazy val sourcecode = crossProject
35+
.settings(baseSettings)
36+
.settings(
37+
libraryDependencies ++= macroDependencies(scalaVersion.value),
38+
unmanagedSourceDirectories in Compile ++= {
39+
CrossVersion.partialVersion(scalaVersion.value) match {
40+
case Some((2, n)) if n >= 12 =>
41+
Seq(baseDirectory.value / ".." / "shared" / "src" / "main" / "scala-2.11")
42+
case _ =>
43+
Seq()
44+
}
45+
},
46+
publishTo := Some("releases" at "https://oss.sonatype.org/service/local/staging/deploy/maven2")
47+
)
5148

5249
lazy val js = sourcecode.js
5350
lazy val jvm = sourcecode.jvm

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=0.13.13
1+
sbt.version=0.13.15

project/build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.13")
1+
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.16")

0 commit comments

Comments
 (0)