Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Show UTF-8 text properly in Gradle

I have a task:

task info<<{     println "Gradle — система автоматической сборки, построенная на принципах Apache Ant и Apache Maven, но предоставляющая DSL на языке Groovy вместо традиционной XML-образной формы представления конфигурации проекта." } 

when I use the command:

gradle info -Dfile.encoding=UTF-8 

The text is not shown properly. How to fix it? Thanks.

like image 657
Xelian Avatar asked Jan 21 '14 19:01

Xelian


1 Answers

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' } 
like image 57
Tapa Save Avatar answered Oct 02 '22 13:10

Tapa Save