Show UTF-8 text properly in Gradle

I use next setting in build.gradle and it works fine for me:

compileJava.options.encoding = 'UTF-8'

tasks.withType(JavaCompile) {
    options.encoding = 'UTF-8'
}

Leave a Comment