i'm building java fx application uses dialog
classes added oracle jdk 1.8 in update 40. therefore, minimal required java version 1.8u40.
i want ensure version requirement in gradle build file. obviously, checking against major version with
assert org.gradle.api.javaversion.current().isjava8compatible()
does not in case omits update number.
how specify contraint in build file?
taking account opal's suggestion following splits version string , checks against update number.
if (javaversion.startswith("1.8.0") && javaversion.split("_")[1].tointeger() < 40) { throw new gradleexception("java version 1.8.0_40 or later required, $javaversion") }
Comments
Post a Comment