compileJava.options.compilerArgs = [’-encoding’, ‘ISO-8859-1’] doesn’t seem to be working on recent releases (I’m using compileJava.options.encoding which works though).
If you set both, one will win (behavior should be same as for javac). Apart from that, both notations should work. Which version of Gradle did you try with? Which OS?