From 7bf8b2b202b5926ef40708aed1be532b77800edb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Prante?= Date: Fri, 4 Nov 2022 16:51:12 +0100 Subject: [PATCH] add UTF-8 encoding to java compilation tasks --- gradle/compile/java.gradle | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/gradle/compile/java.gradle b/gradle/compile/java.gradle index b011802..55ccc91 100644 --- a/gradle/compile/java.gradle +++ b/gradle/compile/java.gradle @@ -21,14 +21,6 @@ jar { duplicatesStrategy = DuplicatesStrategy.INCLUDE } -tasks.withType(JavaCompile) { - options.compilerArgs.add('-Xlint:all,-exports') -} - -javadoc { - options.addStringOption('Xdoclint:none', '-quiet') -} - task sourcesJar(type: Jar, dependsOn: classes) { classifier 'sources' from sourceSets.main.allSource @@ -42,3 +34,13 @@ task javadocJar(type: Jar, dependsOn: javadoc) { artifacts { archives sourcesJar, javadocJar } + +tasks.withType(JavaCompile) { + options.compilerArgs.add('-Xlint:all') + options.encoding = 'UTF-8' +} + +tasks.withType(Javadoc) { + options.addStringOption('Xdoclint:none', '-quiet') + options.encoding = 'UTF-8' +}