After upgrading to Gradle 2.0: Could not find property 'Compile' on root project
For Groovy based projects. It'd be:
tasks.withType(GroovyCompile) {
options.debug = true
}
Use task.withType(JavaCompile)
.
My code:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.bmuschko:gradle-tomcat-plugin:2.2.3'
}
tasks.withType(JavaCompile) {
options.debug = true
options.debugOptions.debugLevel = "source,lines,vars"
options.encoding = "UTF-8"
}
}
Changing the line to
tasks.withType(JavaCompile) { options.encoding = "UTF-8" }
fixed the issue.