Enforce JDK 16 as a minimum

This commit is contained in:
Anuken 2021-06-14 10:55:28 -04:00
parent 51040f9f3d
commit 1a03151966
3 changed files with 5 additions and 8 deletions

View File

@ -196,12 +196,7 @@ allprojects{
tasks.withType(JavaCompile){
targetCompatibility = 8
//TODO fix dynamically, this is a hack
if(System.getProperty("user.name") == "anuke"){
sourceCompatibility = JavaVersion.VERSION_15
}else{
sourceCompatibility = JavaVersion.VERSION_14
}
sourceCompatibility = JavaVersion.VERSION_16
options.encoding = "UTF-8"
options.compilerArgs += ["-Xlint:deprecation"]
dependsOn clearCache

View File

@ -10,4 +10,6 @@ kapt.include.compile.classpath=false
kotlin.stdlib.default.dependency=false
#needed for android compilation
android.useAndroidX=true
#suppresses a warning I don't care about
android.disableAutomaticComponentCreation=true
archash=3926b785320fea0cd9ca597f6bfa9071263a5464

View File

@ -1,5 +1,5 @@
if(JavaVersion.current().ordinal() < JavaVersion.VERSION_14.ordinal()){
throw new GradleException("!!! YOU MUST USE JAVA 14 OR ABOVE TO COMPILE AND RUN MINDUSTRY !!! Read the README. Your version: ${System.properties["java.version"]}")
if(JavaVersion.current().ordinal() < JavaVersion.VERSION_16.ordinal()){
throw new Exception("!!! YOU MUST USE JAVA 16 OR ABOVE TO COMPILE AND RUN MINDUSTRY !!! Read the README. Your version: ${System.properties["java.version"]}")
}
include 'desktop', 'core', 'server', 'ios', 'annotations', 'tools', 'tests'