How should I set encoding for java compile


(Mark Thornton) #1

This

tasks.withType(Compile) {

options.encoding = ‘ISO-8859-1’ }

works but is deprecated. What is the current recommended method(s). Also is the default encoding that of the platform on which gradle is run?


(Peter Niederwieser) #2

Replace ‘Compile’ with ‘JavaCompile’. Yes, platform encoding is the default.