File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -118,15 +118,17 @@ subprojects {
118118 }
119119}
120120
121- val jvmVersion = Jvm .current().javaVersion?.majorVersion
122- val minSdk = libs.versions.compileSdk.get()
123- if (jvmVersion != " 17" && jvmVersion != " 21" && jvmVersion != " 24" ) {
121+ val jvmVersion = Jvm .current().javaVersion?.majorVersion.parseIntOrDefault(defaultValue = 0 )
122+ val minSdk = libs.versions.minSdk.get()
123+ val jvmVersionLowerBound = 17
124+ val jvmVersionUpperBound = 24
125+ if (jvmVersion !in jvmVersionLowerBound.. jvmVersionUpperBound) {
124126 println (" \n\n\n " )
125127 println (" **************************************************************************************************************" )
126128 println (" \n\n\n " )
127- println (" ERROR: AnkiDroid builds with JVM version 17, 21 and 24 ." )
129+ println (" ERROR: AnkiDroid builds with JVM versions between $jvmVersionLowerBound and $jvmVersionUpperBound ." )
128130 println (" Incompatible major version detected: '$jvmVersion '" )
129- if (jvmVersion.parseIntOrDefault(defaultValue = 0 ) > 24 ) {
131+ if (jvmVersion > jvmVersionUpperBound ) {
130132 println (" \n\n\n " )
131133 println (" If you receive this error because you want to use a newer JDK, we may accept PRs to support new versions." )
132134 println (" Edit the main build.gradle file, find this message in the file, and add support for the new version." )
You can’t perform that action at this time.
0 commit comments