Will specify what charset the source files are written in, it doesn’t effect execution beyond that.
Generally, the gradle.properties file is the best solution as it enforces the default encoding for the build JVM, and all JVMs that Gradle forks off (e.g. to execute tests) will inherit this default. Another option is to configure it for test execution only.
<code> test { systemProperty “file.encoding”, “utf-8” } </code>