From 6cb444455d3194fa8e9ff280a47958c50762111f Mon Sep 17 00:00:00 2001 From: Paint_Ninja Date: Sun, 6 Mar 2022 14:53:15 +0000 Subject: [PATCH] Use UTF-8 charset for Java compilation (#8486) --- build.gradle | 4 ++++ mdk/build.gradle | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/build.gradle b/build.gradle index 47acc70d80..a6e696b7c4 100644 --- a/build.gradle +++ b/build.gradle @@ -1543,6 +1543,10 @@ project(':forge') { } // Since we need the modules in the bootstrap, we need to make sure they are compiled before we do each run afterEvaluate { prepareRuns.dependsOn(':fmlcore:jar', ':fmlloader:jar', ':javafmllanguage:jar', ':mclanguage:jar') } + + tasks.withType(JavaCompile).configureEach { + options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation + } } //evaluationDependsOnChildren() diff --git a/mdk/build.gradle b/mdk/build.gradle index b988736c08..4f1e84df32 100644 --- a/mdk/build.gradle +++ b/mdk/build.gradle @@ -199,3 +199,7 @@ publishing { } } } + +tasks.withType(JavaCompile).configureEach { + options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation +}