From 1a031519666434d624072e09f0067b8362cfd710 Mon Sep 17 00:00:00 2001 From: Anuken Date: Mon, 14 Jun 2021 10:55:28 -0400 Subject: [PATCH] Enforce JDK 16 as a minimum --- build.gradle | 7 +------ gradle.properties | 2 ++ settings.gradle | 4 ++-- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/build.gradle b/build.gradle index 27969b5cb6..09feb3183b 100644 --- a/build.gradle +++ b/build.gradle @@ -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 diff --git a/gradle.properties b/gradle.properties index 8198f3fd92..30f7da1b8d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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 diff --git a/settings.gradle b/settings.gradle index ef9b57e54a..76eaa676a6 100644 --- a/settings.gradle +++ b/settings.gradle @@ -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'