Skip to content

Commit

Permalink
Merge pull request #3393 from square/jw/configure/2020-05-16
Browse files Browse the repository at this point in the history
Move source/target config out of error-prone block
  • Loading branch information
swankjesse authored May 16, 2020
2 parents c301cc8 + d806369 commit 2fe519b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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)
Expand Down

0 comments on commit 2fe519b

Please sign in to comment.