Workaround for Guice Java 11 bug
parent
4b1803ee73
commit
0e90043cf8
18
build.sc
18
build.sc
|
@ -8,6 +8,24 @@ object shingle extends ScalaModule
|
|||
def mainClass = Some("net.okennedy.shingle.Shingle")
|
||||
def ammoniteVersion = "2.5.3"
|
||||
|
||||
def internalJavaVersion = T {
|
||||
try {
|
||||
val jvm = System.getProperties().getProperty("java.version")
|
||||
println(f"Running Vizier with `${jvm}`")
|
||||
jvm.split("\\.")(0).toInt
|
||||
} catch {
|
||||
case _:NumberFormatException | _:ArrayIndexOutOfBoundsException => 8
|
||||
}
|
||||
}
|
||||
|
||||
def forkArgs = T {
|
||||
if(internalJavaVersion() >= 11){
|
||||
Seq(
|
||||
// Needed workaround for GUICE permissions bug (dependency in MQTT)
|
||||
"--add-opens", "java.base/java.lang=ALL-UNNAMED"
|
||||
)
|
||||
} else { Seq[String]() }
|
||||
}
|
||||
|
||||
def ivyDeps = Agg(
|
||||
ivy"com.lihaoyi::ujson:2.0.0",
|
||||
|
|
Loading…
Reference in New Issue