From ad0752fe78ee48d3f1212163c9e9a541e8e5c3ba Mon Sep 17 00:00:00 2001 From: modmuss50 Date: Wed, 11 Nov 2020 22:19:43 +0000 Subject: [PATCH] Fix some IDE's (vsc) not detecting the correct java version to compile for. --- build.gradle | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index e619e44..62083f9 100644 --- a/build.gradle +++ b/build.gradle @@ -3,6 +3,9 @@ plugins { id 'maven-publish' } +sourceCompatibility = JavaVersion.VERSION_1_8 +targetCompatibility = JavaVersion.VERSION_1_8 + archivesBaseName = project.archives_base_name version = project.mod_version group = project.maven_group @@ -41,9 +44,6 @@ tasks.withType(JavaCompile).configureEach { def targetVersion = 8 if (JavaVersion.current().isJava9Compatible()) { it.options.release = targetVersion - } else { - it.sourceCompatibility = JavaVersion.toVersion(targetVersion) - it.targetCompatibility = JavaVersion.toVersion(targetVersion) } }