1load("//:gax_java.bzl", "google_java_format", "google_java_format_verification", "java_tests") 2 3_JAVA_COPTS = [ 4 "-source", 5 "1.8", 6 "-target", 7 "1.8", 8] 9 10_COMPILE_DEPS = [ 11 "@com_google_code_gson_gson//jar", 12 "@com_google_guava_guava//jar", 13 "@com_google_code_findbugs_jsr305//jar", 14 "@org_threeten_threetenbp//jar", 15 "@com_google_http_client_google_http_client//jar", 16 "@com_google_auth_google_auth_library_oauth2_http//jar", 17 "@com_google_auth_google_auth_library_credentials//jar", 18 "@com_google_api_api_common//jar", 19 "@com_google_auto_value_auto_value//jar", 20 "@com_google_auto_value_auto_value_annotations//jar", 21 "@javax_annotation_javax_annotation_api//jar", 22 "@com_google_http_client_google_http_client_gson//jar", 23 "@com_google_api_grpc_proto_google_common_protos//jar", 24 "@com_google_protobuf//:protobuf_java", 25 "@com_google_protobuf_java_util//jar", 26 "//gax:gax", 27] 28 29_TEST_COMPILE_DEPS = [ 30 "@junit_junit//jar", 31 "@org_mockito_mockito_core//jar", 32 "@com_google_truth_truth//jar", 33 "//gax:gax_testlib", 34 "@com_googlecode_java_diff_utils_diffutils//jar", 35] 36 37java_library( 38 name = "gax_httpjson", 39 srcs = glob(["src/main/java/**/*.java"]), 40 javacopts = _JAVA_COPTS, 41 plugins = ["//:auto_value_plugin"], 42 resources = ["//:dependencies.properties"], 43 visibility = ["//visibility:public"], 44 deps = _COMPILE_DEPS, 45) 46 47java_library( 48 name = "gax_httpjson_testlib", 49 srcs = glob(["src/test/java/**/*.java"]), 50 javacopts = _JAVA_COPTS, 51 plugins = ["//:auto_value_plugin"], 52 visibility = ["//visibility:public"], 53 deps = [":gax_httpjson"] + _COMPILE_DEPS + _TEST_COMPILE_DEPS, 54) 55 56java_tests( 57 name = "gax_httpjson_tests", 58 size = "small", 59 srcs = glob( 60 include = ["src/test/java/**/*Test.java"], 61 exclude = [ 62 "src/test/java/**/Abstract*Test.java", 63 ], 64 ), 65 runtime_deps = [":gax_httpjson_testlib"], 66) 67 68google_java_format( 69 name = "google_java_format", 70 srcs = glob(["src/**/*.java"]), 71 formatter = "//:google_java_format_binary", 72) 73 74#Uncomment once java formatter is upgraded to 1.6+ 75#google_java_format_verification( 76# name = "google_java_format_verification", 77# srcs = glob(["src/**/*.java"]), 78# formatter = "//:google_java_format_binary", 79#) 80