aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2022-10-26 17:45:59 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2022-10-26 17:45:59 +0000
commit7c2c3f58b6bfe75cb3f3cd3204cf2f9ef447ec12 (patch)
tree7b5c93f17f2da2fdf9938a26fb644ab1853b30d3
parent2755b74f85b08a81524159cb7ff1d0e1f5c7426a (diff)
parente61e618234ae202ac54a1fa09fd1bcbee4776a7f (diff)
downloadokhttp-7c2c3f58b6bfe75cb3f3cd3204cf2f9ef447ec12.tar.gz
Merge "Fix errorprone warnings that should be errors"
-rw-r--r--Android.bp14
1 files changed, 14 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
index 8d5232c..c203955 100644
--- a/Android.bp
+++ b/Android.bp
@@ -32,6 +32,16 @@ license {
],
}
+java_defaults {
+ name: "okhttp_errorprone_defaults",
+ errorprone: {
+ javacflags: [
+ "-Xep:InvalidTimeZoneID:WARN",
+ "-Xep:TryFailThrowable:WARN",
+ ],
+ },
+}
+
// The source files that contribute to Android's core library APIs.
filegroup {
name: "okhttp_api_files",
@@ -49,6 +59,7 @@ nojarjar_visibility = [
// non-jarjar'd version of okhttp to compile the tests against
java_library {
name: "okhttp-nojarjar",
+ defaults: ["okhttp_errorprone_defaults"],
visibility: nojarjar_visibility,
srcs: [
"android/src/main/java/**/*.java",
@@ -91,6 +102,7 @@ filegroup {
java_library {
name: "okhttp",
+ defaults: ["okhttp_errorprone_defaults"],
visibility: [
"//art/build/apex",
"//art/build/sdk",
@@ -141,6 +153,7 @@ java_library {
// third-party or unbundled applications or libraries that require OkHttp.
java_library {
name: "okhttp-norepackage",
+ defaults: ["okhttp_errorprone_defaults"],
host_supported: true,
apex_available: ["com.android.adservices"],
visibility: [
@@ -196,6 +209,7 @@ java_library {
java_library {
name: "okhttp-tests-nojarjar",
+ defaults: ["okhttp_errorprone_defaults"],
visibility: nojarjar_visibility,
srcs: [
"android/test/java/**/*.java",