diff options
author | modmuss50 <modmuss50@gmail.com> | 2020-11-11 22:19:43 +0000 |
---|---|---|
committer | modmuss50 <modmuss50@gmail.com> | 2020-11-11 22:19:43 +0000 |
commit | ad0752fe78ee48d3f1212163c9e9a541e8e5c3ba (patch) | |
tree | 58b800cf7e576efc408e88e38b393068af2d18bc | |
parent | a126c7916aaea2e42e764ce6d15a87cc7a313d56 (diff) |
Fix some IDE's (vsc) not detecting the correct java version to compile for.
-rw-r--r-- | build.gradle | 6 |
1 files 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) } } |