提交 d8063692 编写于 作者: J Jake Wharton

Move source/target config out of error-prone block

Error-prone only works on pre-12 at the moment and we need this configuration to apply for all JDKs.
上级 c301cc8b
......@@ -59,6 +59,12 @@ subprojects {
jcenter()
}
tasks.withType(JavaCompile).configureEach { task ->
task.options.encoding = 'UTF-8'
task.sourceCompatibility = JavaVersion.VERSION_1_8
task.targetCompatibility = JavaVersion.VERSION_1_8
}
// Error-prone only works on JDK 11 or older currently.
if (!Jvm.current().javaVersion.isJava12Compatible()) {
apply plugin: 'net.ltgt.errorprone'
......@@ -69,10 +75,6 @@ subprojects {
}
tasks.withType(JavaCompile).configureEach { task ->
task.options.encoding = 'UTF-8'
task.sourceCompatibility = JavaVersion.VERSION_1_8
task.targetCompatibility = JavaVersion.VERSION_1_8
task.options.errorprone {
excludedPaths = '.*/build/generated/source/proto/.*'
check('MissingFail', CheckSeverity.ERROR)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册