add UTF-8 encoding to java compilation tasks

This commit is contained in:
Jörg Prante 2022-11-04 16:51:12 +01:00
parent f8fa71892a
commit 7bf8b2b202

View file

@ -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'
}