I'm using intellij to create sbt cross compile platforms project with the following platforms JVM,JS,NativeWin,NativeUbuntu, Android and Shared scala code.I need java 8 in my project and it seems that android doesn't work with java 8 version ,due to I specified 1.7 version in sbt file for android module as follow :
Android module build.sbt
file
val commonSettings = Seq(
version := "0.0.1",
scalaVersion := "2.11.12",
scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature", "-target:jvm-1.7"),
javacOptions ++= Seq("-source", "1.7", "-target", "1.7"),
exportJars := true
)
lazy val android = (project in file("."))
.enablePlugins(AndroidLib)
.settings(commonSettings: _*)
.settings(
name := "sgl-android",
platformTarget := "android-28",
useProguard := true
)
Project settings :
I got this error :
Error:java: javacTask: source release 1.8 requires target release 1.8