Merge pull request #25962 from akka/dontRelyOnBootstrapPathWhenRunningOnJdk8

Don't set bootclasspath when already on jdk8
This commit is contained in:
Patrik Nordwall 2018-11-23 15:06:06 +01:00 committed by GitHub
commit d2475a381a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -98,7 +98,9 @@ object AkkaBuild {
// invocation of 'ByteBuffer.clear()' in EnvelopeBuffer.class with 'javap -c': it should refer to // invocation of 'ByteBuffer.clear()' in EnvelopeBuffer.class with 'javap -c': it should refer to
// "java/nio/ByteBuffer.clear:()Ljava/nio/Buffer" and not "java/nio/ByteBuffer.clear:()Ljava/nio/ByteBuffer": // "java/nio/ByteBuffer.clear:()Ljava/nio/Buffer" and not "java/nio/ByteBuffer.clear:()Ljava/nio/ByteBuffer":
scalacOptions in Compile ++= ( scalacOptions in Compile ++= (
if (scalaBinaryVersion.value == "2.11" || System.getProperty("java.version").startsWith("1.")) if (System.getProperty("java.version").startsWith("1.")) Seq()
else
if (scalaBinaryVersion.value == "2.11")
Seq("-target:jvm-1.8", "-javabootclasspath", CrossJava.Keys.fullJavaHomes.value("8") + "/jre/lib/rt.jar") Seq("-target:jvm-1.8", "-javabootclasspath", CrossJava.Keys.fullJavaHomes.value("8") + "/jre/lib/rt.jar")
else else
// -release 8 is not enough, for some reason we need the 8 rt.jar explicitly #25330 // -release 8 is not enough, for some reason we need the 8 rt.jar explicitly #25330
@ -106,8 +108,18 @@ object AkkaBuild {
scalacOptions in Compile ++= (if (allWarnings) Seq("-deprecation") else Nil), scalacOptions in Compile ++= (if (allWarnings) Seq("-deprecation") else Nil),
scalacOptions in Test := (scalacOptions in Test).value.filterNot(opt scalacOptions in Test := (scalacOptions in Test).value.filterNot(opt
opt == "-Xlog-reflective-calls" || opt.contains("genjavadoc")), opt == "-Xlog-reflective-calls" || opt.contains("genjavadoc")),
javacOptions in compile ++= DefaultJavacOptions ++ Seq("-source", "8", "-target", "8", "-bootclasspath", CrossJava.Keys.fullJavaHomes.value("8") + "/jre/lib/rt.jar"), javacOptions in compile ++= DefaultJavacOptions ++ (
javacOptions in test ++= DefaultJavacOptions ++ Seq("-source", "8", "-target", "8", "-bootclasspath", CrossJava.Keys.fullJavaHomes.value("8") + "/jre/lib/rt.jar"), if (System.getProperty("java.version").startsWith("1."))
Seq()
else
Seq("-source", "8", "-target", "8", "-bootclasspath", CrossJava.Keys.fullJavaHomes.value("8") + "/jre/lib/rt.jar")
),
javacOptions in test ++= DefaultJavacOptions ++ (
if (System.getProperty("java.version").startsWith("1."))
Seq()
else
Seq("-source", "8", "-target", "8", "-bootclasspath", CrossJava.Keys.fullJavaHomes.value("8") + "/jre/lib/rt.jar")
),
javacOptions in compile ++= (if (allWarnings) Seq("-Xlint:deprecation") else Nil), javacOptions in compile ++= (if (allWarnings) Seq("-Xlint:deprecation") else Nil),
javacOptions in doc ++= Seq(), javacOptions in doc ++= Seq(),