diff --git a/gradle-baseline-java/src/main/groovy/com/palantir/baseline/plugins/BaselineErrorProne.groovy b/gradle-baseline-java/src/main/groovy/com/palantir/baseline/plugins/BaselineErrorProne.groovy index f779edb87..f49974b71 100644 --- a/gradle-baseline-java/src/main/groovy/com/palantir/baseline/plugins/BaselineErrorProne.groovy +++ b/gradle-baseline-java/src/main/groovy/com/palantir/baseline/plugins/BaselineErrorProne.groovy @@ -19,6 +19,7 @@ package com.palantir.baseline.plugins import net.ltgt.gradle.errorprone.ErrorPronePlugin import org.gradle.api.GradleException import org.gradle.api.Project +import org.gradle.api.tasks.compile.JavaCompile class BaselineErrorProne extends AbstractBaselinePlugin { @@ -30,6 +31,14 @@ class BaselineErrorProne extends AbstractBaselinePlugin { // TODO(rfink): This is somewhat ugly. Is there a better to add the processor dependency on the library? errorprone "com.palantir.baseline:baseline-error-prone:${extractVersionString()}" } + + project.tasks.withType(JavaCompile) { + options.compilerArgs += [ + "-XepDisableWarningsInGeneratedCode", + "-Xep:EqualsHashCode:ERROR", + "-Xep:EqualsIncompatibleType:ERROR", + ] + } } private String extractVersionString() {