Specify 'jvm8' target when building on jvm8

Refining #25962, fixing the 2.11 build
This commit is contained in:
Arnout Engelen 2018-11-26 13:53:58 +01:00
parent 039bb26d2c
commit baa9d19895
2 changed files with 3 additions and 2 deletions

View file

@ -1,4 +1,4 @@
/**
/*
* Copyright (C) 2009-2018 Lightbend Inc. <https://www.lightbend.com>
*/

View file

@ -98,7 +98,8 @@ object AkkaBuild {
// 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":
scalacOptions in Compile ++= (
if (System.getProperty("java.version").startsWith("1.")) Seq()
if (System.getProperty("java.version").startsWith("1."))
Seq("-target:jvm-1.8")
else
if (scalaBinaryVersion.value == "2.11")
Seq("-target:jvm-1.8", "-javabootclasspath", CrossJava.Keys.fullJavaHomes.value("8") + "/jre/lib/rt.jar")