From e7e85542be4d9fed0d4331cae533fd794fd24024 Mon Sep 17 00:00:00 2001 From: LambdAurora Date: Fri, 12 Feb 2021 13:01:19 +0100 Subject: [PATCH] Add comment on targetJavaVersion. --- build.gradle | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 10f173a..c54a9ec 100644 --- a/build.gradle +++ b/build.gradle @@ -7,6 +7,8 @@ archivesBaseName = project.archives_base_name version = project.mod_version group = project.maven_group +// This field defines the Java version your mod target. +// The Minecraft launcher currently installs Java 8 for users, so your mod probably wants to target Java 8 too. def targetJavaVersion = 8 repositories { @@ -48,7 +50,6 @@ tasks.withType(JavaCompile).configureEach { // If Javadoc is generated, this must be specified in that task too. it.options.encoding = "UTF-8" - // The Minecraft launcher currently installs Java 8 for users, so your mod probably wants to target Java 8 too // JDK 9 introduced a new way of specifying this that will make sure no newer classes or methods are used. // We'll use that if it's available, but otherwise we'll use the older option. if (JavaVersion.current().isJava9Compatible()) {