I’m trying build multiple projects with jdk8 and jdk10. Some projects has common code with android application so most of projects should be build with jdk8. I tried build one application with jdk10, but it is failing.
I tried use solutions like:
- Setting org.gradle.java.home=/usr/lib/jvm/java-10-oracle in gradle.properties in subfolder.
- options.forkOptions.executable = project.property(‘javacPath’)
I got error:
Could not target platform: ‘Java SE 10’ using tool chain: ‘JDK 8 (1.8)’.
- I tried use options.bootClasspath, but it is deprecated and JDK10 doesn’t support bootClasspath
My project structure looks like:
Ant: Apache Ant™ version 1.9.9 compiled on February 2 2017
JVM: 1.8.0_171 (Oracle Corporation 25.171-b11)
OS: Linux 4.13.0-41-generic amd64