Closed sschuberth closed 4 years ago
It was hardcoded because we wanted to use the latest version of JavaFX irrespective of the Java version used.
But arbitrarily mixing the JavaFX version with a different Java version potentially leads to compile errors. I cannot recall the exact error message right now, but I believe I was unable to use Java 11 this way.
All JavaFX versions after 11 is compatible with Java 11+. If you find a compatibility issue with any version, please report.
I can't reproduce the issue anymore right now, but I still believe it could make sense to do something like
version = 11.coerceAtLeast(JavaVersion.current().majorVersion.toInt()).toString()
(in Kotlin DSL syntax) here.
Instead of doing
https://github.com/openjfx/javafx-gradle-plugin/blob/e03fb27aedfdf85bca7d98fce474e6ce609201e4/src/main/java/org/openjfx/gradle/JavaFXOptions.java#L51
it seems more reasonable to me to do something like