Skip to content

Commit

Permalink
[BEAM-4322] Enforce ErrorProne analysis in protobuf extensions project
Browse files Browse the repository at this point in the history
  • Loading branch information
cademarkegard authored and pabloem committed May 30, 2018
1 parent dc92898 commit b414da9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build_rules.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ ext.applyJavaNature = {
if (configuration.enableErrorProne) {
options.compilerArgs += [
"-XepDisableWarningsInGeneratedCode",
"-XepExcludedPaths:.*/build/generated.*avro-java/.*",
"-XepExcludedPaths:(.*/)?(build/generated.*avro-java|build/generated)/.*",
"-Xep:MutableConstantField:OFF" // Guava's immutable collections cannot appear on API surface.
]
}
Expand Down
3 changes: 2 additions & 1 deletion sdks/java/extensions/protobuf/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

apply from: project(":").file("build_rules.gradle")
applyJavaNature()
applyJavaNature(failOnWarning: true)
applyGrpcNature()

description = "Apache Beam :: SDKs :: Java :: Extensions :: Protobuf"
Expand All @@ -27,6 +27,7 @@ dependencies {
compile library.java.guava
shadow project(path: ":beam-sdks-java-core", configuration: "shadow")
shadow library.java.protobuf_java
shadow library.java.findbugs_annotations
testCompile project(path: ":beam-sdks-java-core", configuration: "shadowTest")
testCompile library.java.hamcrest_core
testCompile library.java.mockito_core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public class ByteStringCoderTest {
static {
ImmutableList.Builder<ByteString> builder = ImmutableList.builder();
for (String s : TEST_STRING_VALUES) {
builder.add(ByteString.copyFrom(s.getBytes()));
builder.add(ByteString.copyFromUtf8(s));
}
TEST_VALUES = builder.build();
}
Expand Down

0 comments on commit b414da9

Please sign in to comment.