Skip to content

Commit 96e0480

Browse files
MasseGuillaumeolafurpg
authored andcommitted
cross build to 2.13
1 parent d0e8d3c commit 96e0480

File tree

4 files changed

+71
-53
lines changed

4 files changed

+71
-53
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: 42 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,26 @@
11
import OsgiKeys._
22

3-
crossScalaVersions := Seq("2.10.6", "2.11.8", "2.12.0")
3+
val baseSettings = Seq(
4+
organization := "com.lihaoyi",
5+
name := "sourcecode",
6+
version := "0.1.4",
7+
scalaVersion := "2.11.11",
8+
crossScalaVersions := Seq("2.10.6", "2.11.11", "2.12.2", "2.13.0-M1"),
9+
scmInfo := Some(ScmInfo(
10+
browseUrl = url("https://github.com/lihaoyi/sourcecode"),
11+
connection = "scm:git:git@github.com:lihaoyi/sourcecode.git"
12+
)),
13+
homepage := Some(url("https://github.com/lihaoyi/sourcecode")),
14+
licenses := Seq("MIT" -> url("http://www.opensource.org/licenses/mit-license.html")),
15+
developers += Developer(
16+
email = "haoyi.sg@gmail.com",
17+
id = "lihaoyi",
18+
name = "Li Haoyi",
19+
url = url("https://github.com/lihaoyi")
20+
)
21+
)
22+
23+
baseSettings
424

525
def macroDependencies(version: String) =
626
Seq(
@@ -13,46 +33,27 @@ def macroDependencies(version: String) =
1333
else
1434
Seq())
1535

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

5758
lazy val js = sourcecode.js
5859
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,2 +1,2 @@
1-
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.13")
1+
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.16")
22
addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.8.0")

0 commit comments

Comments
 (0)