Skip to content

Commit f8e75a4

Browse files
authored
Merge pull request #180 from ashawley/java9
Add Java 9 to Travis
2 parents 44861f0 + 598fe78 commit f8e75a4

File tree

3 files changed

+22
-5
lines changed

3 files changed

+22
-5
lines changed

.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ addons:
2222
jdk:
2323
- openjdk6
2424
- oraclejdk8
25+
- oraclejdk9
2526

2627
notifications:
2728

build.sbt

+20-4
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,27 @@ lazy val xml = crossProject.in(file("."))
2727

2828
apiMappings ++= Map(
2929
scalaInstance.value.libraryJar
30-
-> url(s"http://www.scala-lang.org/api/${scalaVersion.value}/"),
30+
-> url(s"http://www.scala-lang.org/api/${scalaVersion.value}/")
31+
) ++ {
3132
// http://stackoverflow.com/questions/16934488
32-
file(System.getProperty("sun.boot.class.path").split(java.io.File.pathSeparator).filter(_.endsWith(java.io.File.separator + "rt.jar")).head)
33-
-> url("http://docs.oracle.com/javase/8/docs/api")
34-
)
33+
Option(System.getProperty("sun.boot.class.path")).flatMap { classPath =>
34+
classPath.split(java.io.File.pathSeparator).filter(_.endsWith(java.io.File.separator + "rt.jar")).headOption
35+
}.map { jarPath =>
36+
Map(
37+
file(jarPath)
38+
-> url("http://docs.oracle.com/javase/8/docs/api")
39+
)
40+
} getOrElse {
41+
// If everything fails, jam in the Java 9 base module.
42+
Map(
43+
file("/modules/java.base")
44+
-> url("http://docs.oracle.com/javase/9/docs/api"),
45+
file("/modules/java.xml")
46+
-> url("http://docs.oracle.com/javase/9/docs/api")
47+
48+
)
49+
}
50+
}
3551
)
3652
.jvmSettings(
3753
OsgiKeys.exportPackage := Seq(s"scala.xml.*;version=${version.value}"),

project/build.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=0.13.16
1+
sbt.version=0.13.17

0 commit comments

Comments
 (0)