-
Notifications
You must be signed in to change notification settings - Fork 92
add Java 9 test #179
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
add Java 9 test #179
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ addons: | |
jdk: | ||
- openjdk6 | ||
- oraclejdk8 | ||
- oraclejdk9 | ||
|
||
notifications: | ||
email: [email protected] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import ScalaModulePlugin._ | ||
|
||
scalaVersionsByJvm in ThisBuild := { | ||
val v211 = "2.11.11" | ||
val v211 = "2.11.12" | ||
val v212 = "2.12.3" | ||
val v213 = "2.13.0-M2" | ||
Map( | ||
|
@@ -25,13 +25,23 @@ lazy val xml = crossProject.in(file(".")) | |
scalacOptions ++= "-deprecation:false -feature -Xlint:-stars-align,-nullary-unit,_".split("\\s+").to[Seq], | ||
scalacOptions in Test += "-Xxml:coalescing", | ||
|
||
apiMappings ++= Map( | ||
scalaInstance.value.libraryJar | ||
-> url(s"http://www.scala-lang.org/api/${scalaVersion.value}/"), | ||
// http://stackoverflow.com/questions/16934488 | ||
file(System.getProperty("sun.boot.class.path").split(java.io.File.pathSeparator).filter(_.endsWith(java.io.File.separator + "rt.jar")).head) | ||
-> url("http://docs.oracle.com/javase/8/docs/api") | ||
) | ||
apiMappings ++= { | ||
Map( | ||
scalaInstance.value.libraryJar | ||
-> url(s"http://www.scala-lang.org/api/${scalaVersion.value}/") | ||
) ++ { | ||
// http://stackoverflow.com/questions/16934488 | ||
Option(System.getProperty("sun.boot.class.path")) | ||
.map(path => | ||
Map( | ||
file(path | ||
.split(java.io.File.pathSeparator) | ||
.filter(_.endsWith(java.io.File.separator + "rt.jar")).head) | ||
-> url("http://docs.oracle.com/javase/8/docs/api") | ||
)) | ||
.getOrElse(Map.empty) | ||
} | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This refactoring actually causes an NPE to silently succeed with the This part of the sbt config may get replaced by https://github.com/ThoughtWorksInc/sbt-api-mappings There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, I take this back. We will need to degrade when the Java boostrap classpath is unavailable. I'll be using this PR as a basis for fixing Java 9 including the external doc linking. |
||
) | ||
.jvmSettings( | ||
OsgiKeys.exportPackage := Seq(s"scala.xml.*;version=${version.value}"), | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw @SethTisue mention this, but I'd rather
avoid breakingfix the build for people.