breandan / kotlingrad

🧩 Shape-Safe Symbolic Differentiation with Algebraic Data Types
https://breandan.net/public/masters_thesis.pdf#page=49
Apache License 2.0
530 stars 21 forks source link

Cross-compilation support for Java & OpenJDK 8 #7

Closed tribbloid closed 4 years ago

tribbloid commented 5 years ago

Currently, running ./gradlew test under Java 8 generates the following output:

$ ./gradlew test

...

FAILURE: Build failed with an exception.

* What went wrong:
java.lang.UnsupportedClassVersionError: org/openjfx/gradle/JavaFXPlugin has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
> org/openjfx/gradle/JavaFXPlugin has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 362ms

This seems to imply that support for Java 8 and OpenJDK 8 (which is still the mainstream java environment due to license issues) is discarded in favour of java 11.

Can we revise the gradle build file such that it supports cross-compiilation for both Java 8 and Java 11?

breandan commented 5 years ago

Good point, thanks for the heads up. JavaFX is not strictly required unless you want to render the plots, so we might as well remove this dependency altogether.

tribbloid commented 5 years ago

Thanks a lot, Does OpenJFX has a variant compatible with JVM 8? I may submit a refactoring to leverage this

breandan commented 5 years ago

I don't remember the exact story but IIRC originally it was packaged with JRE 8 then it was spun off into a separate project around 11. Probably best to just remove the dependency and create a separate Gradle project for the demos. Everything else is JRE 8 compatible.