Browse Source

Update the logic to validate the java version

Loosen the check to allow Java version >= 17
Fredia Huya-Kouadio 4 months ago
parent
commit
773fc96ab2
1 changed files with 2 additions and 2 deletions
  1. 2 2
      platform/android/java/app/build.gradle

+ 2 - 2
platform/android/java/app/build.gradle

@@ -269,8 +269,8 @@ task copyAndRenameBinary(type: Copy) {
  * Used to validate the version of the Java SDK used for the Godot gradle builds.
  * Used to validate the version of the Java SDK used for the Godot gradle builds.
  */
  */
 task validateJavaVersion {
 task validateJavaVersion {
-    if (JavaVersion.current() != versions.javaVersion) {
-        throw new GradleException("Invalid Java version ${JavaVersion.current()}. Version ${versions.javaVersion} is the required Java version for Godot gradle builds.")
+    if (!JavaVersion.current().isCompatibleWith(versions.javaVersion)) {
+        throw new GradleException("Invalid Java version ${JavaVersion.current()}. Version ${versions.javaVersion} is the minimum supported Java version for Godot gradle builds.")
     }
     }
 }
 }