diff --git a/common/BUILD b/common/BUILD index b47d6f549..43246ba68 100644 --- a/common/BUILD +++ b/common/BUILD @@ -1,46 +1,101 @@ +# THIS FILE IS AUTO-GENERATED + package(default_visibility = ["//visibility:public"]) load("//tools/checkstyle:checkstyle.bzl", "checkstyle_test") +proto_library( + name = "text_difference_proto", + srcs = ["text_difference.proto"], +) + +java_proto_library( + name = "text_difference_java_proto", + deps = [":text_difference_proto"], +) + java_library( - name = "common", - srcs = [ - "CommandLine.java", - "CommonComponent.java", - "CommonModule.java", - "FileUtils.java", - "HttpUtils.java", - "Lists.java", - "MessageDifferencer.java", - "StringBuilder.java", - "Strings.java", - "Time.java", + name = "command_line", + srcs = ["CommandLine.java"], +) + +checkstyle_test( + name = "command_line-checkstyle", + target = ":command_line", +) + +java_library( + name = "common_component", + srcs = ["CommonComponent.java"], + deps = [ + ":common_module", + ":file_utils", + "//common:dagger_with_annotation_processor", + "//third_party/maven/javax/inject:javax_inject", ], +) + +checkstyle_test( + name = "common_component-checkstyle", + target = ":common_component", +) + +java_library( + name = "common_module", + srcs = ["CommonModule.java"], deps = [ - ":text_differencer", "//common:dagger_with_annotation_processor", - "//third_party/maven/com/google/auto/value:auto_value", - "//third_party/maven/com/google/auto/value:auto_value_annotations", - "//third_party/maven/com/google/code/findbugs:jsr305", + "//third_party/maven/javax/inject:javax_inject", + ], +) + +checkstyle_test( + name = "common_module-checkstyle", + target = ":common_module", +) + +java_library( + name = "diff_match_patch", + srcs = ["DiffMatchPatch.java"], + deps = [":arrays"], +) + +checkstyle_test( + name = "diff_match_patch-checkstyle", + target = ":diff_match_patch", +) + +java_library( + name = "file_utils", + srcs = ["FileUtils.java"], + deps = [ "//third_party/maven/com/google/guava", "//third_party/maven/com/google/protobuf:protobuf_java", "//third_party/maven/javax/inject:javax_inject", - "//third_party/maven/org/apache/commons:commons_lang3", ], ) checkstyle_test( - name = "common-checkstyle", - target = ":common", + name = "file_utils-checkstyle", + target = ":file_utils", +) + +java_library( + name = "http_utils", + srcs = ["HttpUtils.java"], + deps = ["//third_party/maven/javax/inject:javax_inject"], +) + +checkstyle_test( + name = "http_utils-checkstyle", + target = ":http_utils", ) java_library( name = "lists", srcs = ["Lists.java"], deps = [ - "//third_party/maven/com/google/auto/value:auto_value", "//third_party/maven/com/google/auto/value:auto_value_annotations", - "//third_party/maven/com/google/code/findbugs:jsr305", "//third_party/maven/com/google/guava", ], ) @@ -51,82 +106,77 @@ checkstyle_test( ) java_library( - name = "text_differencer", - srcs = [ - "TextDifferencer.java", - ], + name = "message_differencer", + srcs = ["MessageDifferencer.java"], deps = [ - ":diff_match_patch", - ":lists", - ":text_difference_java_proto", - "//common/repo:repo_java_proto", + "//third_party/maven/com/google/auto/value:auto_value_annotations", + "//third_party/maven/com/google/code/findbugs:jsr305", "//third_party/maven/com/google/guava", - "//third_party/maven/javax/inject:javax_inject", + "//third_party/maven/com/google/protobuf:protobuf_java", ], ) checkstyle_test( - name = "text_differencer-checkstyle", - target = ":text_differencer", + name = "message_differencer-checkstyle", + target = ":message_differencer", ) -proto_library( - name = "text_difference_proto", - srcs = ["text_difference.proto"], -) - -java_proto_library( - name = "text_difference_java_proto", - deps = [":text_difference_proto"], +java_library( + name = "string_builder", + srcs = ["StringBuilder.java"], ) -java_plugin( - name = "dagger_compiler_plugin", - generates_api = True, - processor_class = "dagger.internal.codegen.ComponentProcessor", - tags = ["checkstyle_ignore"], - deps = ["//third_party/maven/com/google/dagger:dagger_compiler"], +checkstyle_test( + name = "string_builder-checkstyle", + target = ":string_builder", ) java_library( - name = "dagger_with_annotation_processor", - exported_plugins = [":dagger_compiler_plugin"], - tags = ["checkstyle_ignore"], - exports = ["//third_party/maven/com/google/dagger"], + name = "strings", + srcs = ["Strings.java"], + deps = ["//third_party/maven/org/apache/commons:commons_lang3"], ) -java_library( - name = "auto_factory", - exported_plugins = [":auto_factory_plugin"], - tags = ["checkstyle_ignore"], - exports = ["//third_party/maven/com/google/auto/factory:auto_factory"], +checkstyle_test( + name = "strings-checkstyle", + target = ":strings", ) -java_plugin( - name = "auto_factory_plugin", - generates_api = True, - processor_class = "com.google.auto.factory.processor.AutoFactoryProcessor", - tags = ["checkstyle_ignore"], +java_library( + name = "text_differencer", + srcs = ["TextDifferencer.java"], deps = [ - "//third_party/maven/com/google/auto:auto_common", - "//third_party/maven/com/google/auto/factory:auto_factory", + ":lists", + ":text_difference_java_proto", + "//common:lists", + "//name/fraser/neil/plaintext:diff_match_patch", + "//third_party/maven/com/google/guava", + "//third_party/maven/javax/inject:javax_inject", ], ) +checkstyle_test( + name = "text_differencer-checkstyle", + target = ":text_differencer", +) + java_library( - name = "diff_match_patch", - srcs = ["DiffMatchPatch.java"], - tags = ["checkstyle_ignore"], + name = "time", + srcs = ["Time.java"], +) + +checkstyle_test( + name = "time-checkstyle", + target = ":time", ) java_binary( name = "base64_tool", - srcs = [ - "Base64Tool.java", - ], + srcs = ["Base64Tool.java"], main_class = "com.google.startupos.common.Base64Tool", deps = [ - "//common", + ":common_module", + ":file_utils", "//common:dagger_with_annotation_processor", "//common/flags", "//third_party/maven/com/google/flogger:flogger_system_backend", diff --git a/common/firestore/BUILD b/common/firestore/BUILD index 0e8e99969..66fac2bca 100644 --- a/common/firestore/BUILD +++ b/common/firestore/BUILD @@ -1,40 +1,80 @@ +# THIS FILE IS AUTO-GENERATED + package(default_visibility = ["//visibility:public"]) load("//tools/checkstyle:checkstyle.bzl", "checkstyle_test") java_library( - name = "firestore", - srcs = [ - "FirestoreProtoClient.java", - "MessageWithId.java", - "ProtoChange.java", - "ProtoEventListener.java", - "ProtoQuerySnapshot.java", - ], + name = "firestore_proto_client", + srcs = ["FirestoreProtoClient.java"], deps = [ - "//common:auto_factory", - "//common:auto_factory_plugin", - "//common:dagger_with_annotation_processor", + ":message_with_id", + ":proto_event_listener", + ":proto_query_snapshot", "//third_party/maven/com/google/api:api_common", - "//third_party/maven/com/google/auth:google_auth_library_credentials", "//third_party/maven/com/google/auth:google_auth_library_oauth2_http", - "//third_party/maven/com/google/auto/value:auto_value", - "//third_party/maven/com/google/auto/value:auto_value_annotations", - "//third_party/maven/com/google/cloud:google_cloud_core", - "//third_party/maven/com/google/cloud:google_cloud_core_grpc", "//third_party/maven/com/google/cloud:google_cloud_firestore", "//third_party/maven/com/google/cloud:google_cloud_storage", "//third_party/maven/com/google/code/findbugs:jsr305", - "//third_party/maven/com/google/code/gson", "//third_party/maven/com/google/firebase:firebase_admin", "//third_party/maven/com/google/guava", "//third_party/maven/com/google/protobuf:protobuf_java", - "//third_party/maven/com/google/protobuf:protobuf_java_util", - "//third_party/maven/javax/inject:javax_inject", ], ) checkstyle_test( - name = "firestore-checkstyle", - target = ":firestore", + name = "firestore_proto_client-checkstyle", + target = ":firestore_proto_client", +) + +java_library( + name = "message_with_id", + srcs = ["MessageWithId.java"], + deps = [ + "//third_party/maven/com/google/auto/value:auto_value_annotations", + "//third_party/maven/com/google/protobuf:protobuf_java", + ], +) + +checkstyle_test( + name = "message_with_id-checkstyle", + target = ":message_with_id", +) + +java_library( + name = "proto_change", + srcs = ["ProtoChange.java"], + deps = ["//third_party/maven/com/google/protobuf:protobuf_java"], +) + +checkstyle_test( + name = "proto_change-checkstyle", + target = ":proto_change", +) + +java_library( + name = "proto_event_listener", + srcs = ["ProtoEventListener.java"], +) + +checkstyle_test( + name = "proto_event_listener-checkstyle", + target = ":proto_event_listener", +) + +java_library( + name = "proto_query_snapshot", + srcs = ["ProtoQuerySnapshot.java"], + deps = [ + ":firestore_proto_client", + ":proto_change", + "//third_party/maven/com/google/cloud:google_cloud_firestore", + "//third_party/maven/com/google/guava", + "//third_party/maven/com/google/protobuf:protobuf_java", + ], +) + +checkstyle_test( + name = "proto_query_snapshot-checkstyle", + target = ":proto_query_snapshot", ) diff --git a/common/flags/BUILD b/common/flags/BUILD index 1df8eb6c2..0ad541bb9 100644 --- a/common/flags/BUILD +++ b/common/flags/BUILD @@ -1,38 +1,103 @@ +# THIS FILE IS AUTO-GENERATED + package(default_visibility = ["//visibility:public"]) load("//tools/checkstyle:checkstyle.bzl", "checkstyle_test") +proto_library( + name = "flags_proto", + srcs = ["flags.proto"], +) + +java_proto_library( + name = "flags_java_proto", + deps = [":flags_proto"], +) + java_library( - name = "flags", - srcs = [ - "ClassScanner.java", - "Flag.java", - "FlagDesc.java", - "Flags.java", - "GflagsParser.java", - "UsagePrinter.java", - ], + name = "class_scanner", + srcs = ["ClassScanner.java"], deps = [ + ":flag", + ":flag_desc", ":flags_java_proto", - "//third_party/maven/com/google/code/findbugs:jsr305", "//third_party/maven/com/google/flogger", "//third_party/maven/com/google/guava", - "//third_party/maven/javax/annotation:javax_annotation_api", "//third_party/maven/org/javassist", ], ) +checkstyle_test( + name = "class_scanner-checkstyle", + target = ":class_scanner", +) + +java_library( + name = "flag", + srcs = ["Flag.java"], + deps = [ + ":flags", + "//third_party/maven/com/google/code/findbugs:jsr305", + "//third_party/maven/com/google/flogger", + ], +) + +checkstyle_test( + name = "flag-checkstyle", + target = ":flag", +) + +java_library( + name = "flag_desc", + srcs = ["FlagDesc.java"], +) + +checkstyle_test( + name = "flag_desc-checkstyle", + target = ":flag_desc", +) + +java_library( + name = "flags", + srcs = ["Flags.java"], + deps = [ + ":class_scanner", + ":flags_java_proto", + ":gflags_parser", + ":usage_printer", + "//third_party/maven/com/google/guava", + ], +) + checkstyle_test( name = "flags-checkstyle", target = ":flags", ) -proto_library( - name = "flags_proto", - srcs = ["flags.proto"], +java_library( + name = "gflags_parser", + srcs = ["GflagsParser.java"], + deps = [ + ":flags", + ":flags_java_proto", + "//third_party/maven/com/google/code/findbugs:jsr305", + "//third_party/maven/com/google/flogger", + "//third_party/maven/com/google/guava", + ], ) -java_proto_library( - name = "flags_java_proto", - deps = [":flags_proto"], +checkstyle_test( + name = "gflags_parser-checkstyle", + target = ":gflags_parser", +) + +java_library( + name = "usage_printer", + srcs = ["UsagePrinter.java"], + deps = [":flags_java_proto"], +) + +checkstyle_test( + name = "usage_printer-checkstyle", + target = ":usage_printer", ) diff --git a/common/repo/BUILD b/common/repo/BUILD index c5c29b73e..2046b58c2 100644 --- a/common/repo/BUILD +++ b/common/repo/BUILD @@ -1,3 +1,5 @@ +# THIS FILE IS AUTO-GENERATED + package(default_visibility = ["//visibility:public"]) load("//tools/checkstyle:checkstyle.bzl", "checkstyle_test") @@ -13,25 +15,28 @@ java_proto_library( ) java_library( - name = "repo", - srcs = [ - "GitRepo.java", - "Repo.java", - ], + name = "git_repo", + srcs = ["GitRepo.java"], deps = [ + ":repo", ":repo_java_proto", "//common", - "//common:auto_factory", - "//common:auto_factory_plugin", - "//common:dagger_with_annotation_processor", - "//third_party/maven/com/google/auto/value:auto_value", - "//third_party/maven/com/google/auto/value:auto_value_annotations", - "//third_party/maven/com/google/auto/value:auto_value_plugin", + "//third_party/maven/com/google/auto/factory:auto_factory", + "//third_party/maven/com/google/guava", + ], +) + +checkstyle_test( + name = "git_repo-checkstyle", + target = ":git_repo", +) + +java_library( + name = "repo", + srcs = ["Repo.java"], + deps = [ + ":repo_java_proto", "//third_party/maven/com/google/guava", - "//third_party/maven/com/jcraft:jsch", - "//third_party/maven/javax/annotation:javax_annotation_api", - "//third_party/maven/javax/inject:javax_inject", - "//tools/reviewer/local_server/service:code_review_java_proto", ], ) diff --git a/examples/android/BUILD b/examples/android/BUILD index 9f176c432..10d4300ed 100644 --- a/examples/android/BUILD +++ b/examples/android/BUILD @@ -1,52 +1,36 @@ +# THIS FILE IS AUTO-GENERATED + package(default_visibility = ["//visibility:public"]) -android_library( - name = "firestore_config_manager_impl", - srcs = ["FirestoreInitializer.java"], - deps = ["@com_google_firebase_firebase_common_11_8_0//aar"], -) +load("//tools/checkstyle:checkstyle.bzl", "checkstyle_test") -android_library( - name = "firestore", - exports = [ - "//third_party/maven/com/squareup/okhttp", - "//third_party/maven/com/squareup/okio", - "@com_android_support_support_annotations_27_0_2//jar", - "@com_android_support_support_compat_27_0_2//aar", - "@com_android_support_support_core_ui_27_0_2//aar", - "@com_android_support_support_core_utils_27_0_2//aar", - "@com_android_support_support_fragment_27_0_2//aar", - "@com_android_support_support_media_compat_27_0_2//aar", - "@com_android_support_support_v4_27_0_2//aar", - "@com_google_android_gms_play_services_basement_11_8_0//aar", - "@com_google_android_gms_play_services_basement_license_11_8_0//aar", - "@com_google_android_gms_play_services_tasks_11_8_0//aar", - "@com_google_android_gms_play_services_tasks_license_11_8_0//aar", - "@com_google_firebase_firebase_common_11_8_0//aar", - "@com_google_firebase_firebase_common_license_11_8_0//aar", - "@com_google_firebase_firebase_firestore_11_8_0//aar", +java_library( + name = "firestore_initializer", + srcs = ["FirestoreInitializer.java"], + deps = [ + "android/content:context", + "//third_party/maven/com/google/firebase:firebase_admin", + "//third_party/maven/org/json", ], ) -android_library( - name = "firestore_config_manager", - data = ["assets/google-services.json"], - exports = [":firestore_config_manager_impl"], +checkstyle_test( + name = "firestore_initializer-checkstyle", + target = ":firestore_initializer", ) -android_binary( - name = "android_app", - srcs = glob([ - "MainApplication.java", - "activities/*.java", - ]), - assets = ["assets/google-services.json"], - assets_dir = "assets/", - custom_package = "com.google.startupos.examples.android", - manifest = "AndroidManifest.xml", - resource_files = glob(["res/**"]), +java_library( + name = "main_application", + srcs = ["MainApplication.java"], deps = [ - ":firestore", - ":firestore_config_manager", + "android/app:application", + "android/util:log", + ":firestore_initializer", + "//third_party/maven/org/json", ], ) + +checkstyle_test( + name = "main_application-checkstyle", + target = ":main_application", +) diff --git a/examples/dagger/example1/BUILD b/examples/dagger/example1/BUILD index 211fb7a0a..cdcfd22d7 100644 --- a/examples/dagger/example1/BUILD +++ b/examples/dagger/example1/BUILD @@ -1,28 +1,87 @@ +# THIS FILE IS AUTO-GENERATED + package(default_visibility = ["//visibility:public"]) load("//tools/checkstyle:checkstyle.bzl", "checkstyle_test") java_library( - name = "example1_lib", - srcs = glob(["**/*.java"]), + name = "class1_impl", + srcs = ["Class1Impl.java"], + deps = [":class1_interface"], +) + +checkstyle_test( + name = "class1_impl-checkstyle", + target = ":class1_impl", +) + +java_library( + name = "class1_interface", + srcs = ["Class1Interface.java"], +) + +checkstyle_test( + name = "class1_interface-checkstyle", + target = ":class1_interface", +) + +java_library( + name = "class1_module", + srcs = ["Class1Module.java"], deps = [ + ":class1_impl", + ":class1_interface", "//common:dagger_with_annotation_processor", "//third_party/maven/javax/inject:javax_inject", ], ) checkstyle_test( - name = "example1_lib-checkstyle", - target = ":example1_lib", + name = "class1_module-checkstyle", + target = ":class1_module", ) -java_binary( - name = "example1", - jvm_flags = [ - "-Xms32m", - "-Xmx128m", +java_library( + name = "class2", + srcs = ["Class2.java"], + deps = [ + ":class1_interface", + "//third_party/maven/javax/inject:javax_inject", + ], +) + +checkstyle_test( + name = "class2-checkstyle", + target = ":class2", +) + +java_library( + name = "some_component", + srcs = ["SomeComponent.java"], + deps = [ + ":class2", + "//common:dagger_with_annotation_processor", + "//third_party/maven/javax/inject:javax_inject", ], +) + +checkstyle_test( + name = "some_component-checkstyle", + target = ":some_component", +) + +java_binary( + name = "app", + srcs = ["App.java"], main_class = "com.google.startupos.examples.dagger.example1.App", - tags = ["checkstyle_ignore"], - runtime_deps = [":example1_lib"], + deps = [ + ":dagger_some_component", + ":some_component", + "//third_party/maven/com/google/flogger:flogger_system_backend", + ], +) + +checkstyle_test( + name = "app-checkstyle", + target = ":app", ) diff --git a/examples/dagger/example2/BUILD b/examples/dagger/example2/BUILD index 18e740d0d..40e8c45be 100644 --- a/examples/dagger/example2/BUILD +++ b/examples/dagger/example2/BUILD @@ -1,28 +1,129 @@ +# THIS FILE IS AUTO-GENERATED + package(default_visibility = ["//visibility:public"]) load("//tools/checkstyle:checkstyle.bzl", "checkstyle_test") java_library( - name = "example2_lib", - srcs = glob(["**/*.java"]), + name = "class1_impl", + srcs = ["Class1Impl.java"], + deps = [":class1_interface"], +) + +checkstyle_test( + name = "class1_impl-checkstyle", + target = ":class1_impl", +) + +java_library( + name = "class1_interface", + srcs = ["Class1Interface.java"], +) + +checkstyle_test( + name = "class1_interface-checkstyle", + target = ":class1_interface", +) + +java_library( + name = "class1_module", + srcs = ["Class1Module.java"], deps = [ + ":class1_impl", + ":class1_interface", "//common:dagger_with_annotation_processor", "//third_party/maven/javax/inject:javax_inject", ], ) checkstyle_test( - name = "example2_lib-checkstyle", - target = ":example2_lib", + name = "class1_module-checkstyle", + target = ":class1_module", ) -java_binary( - name = "example2", - jvm_flags = [ - "-Xms32m", - "-Xmx128m", +java_library( + name = "class2_impl", + srcs = ["Class2Impl.java"], + deps = [ + ":class1_interface", + ":class2_interface", + "//third_party/maven/javax/inject:javax_inject", + ], +) + +checkstyle_test( + name = "class2_impl-checkstyle", + target = ":class2_impl", +) + +java_library( + name = "class2_interface", + srcs = ["Class2Interface.java"], +) + +checkstyle_test( + name = "class2_interface-checkstyle", + target = ":class2_interface", +) + +java_library( + name = "class2_module", + srcs = ["Class2Module.java"], + deps = [ + ":class1_module", + ":class2_impl", + ":class2_interface", + "//common:dagger_with_annotation_processor", ], +) + +checkstyle_test( + name = "class2_module-checkstyle", + target = ":class2_module", +) + +java_library( + name = "class3", + srcs = ["Class3.java"], + deps = [ + ":class2_interface", + "//common:dagger_with_annotation_processor", + "//third_party/maven/javax/inject:javax_inject", + ], +) + +checkstyle_test( + name = "class3-checkstyle", + target = ":class3", +) + +java_library( + name = "some_component", + srcs = ["SomeComponent.java"], + deps = [ + ":class3", + "//common:dagger_with_annotation_processor", + "//third_party/maven/javax/inject:javax_inject", + ], +) + +checkstyle_test( + name = "some_component-checkstyle", + target = ":some_component", +) + +java_binary( + name = "app", + srcs = ["App.java"], main_class = "com.google.startupos.examples.dagger.example2.App", - tags = ["checkstyle_ignore"], - runtime_deps = [":example2_lib"], + deps = [ + ":dagger_some_component", + ":some_component", + "//third_party/maven/com/google/flogger:flogger_system_backend", + ], +) + +checkstyle_test( + name = "app-checkstyle", + target = ":app", ) diff --git a/examples/docker/BUILD b/examples/docker/BUILD index 6cc7957ac..43d471cff 100644 --- a/examples/docker/BUILD +++ b/examples/docker/BUILD @@ -1,62 +1,17 @@ -load("@io_bazel_rules_docker//java:image.bzl", "java_image") -load("//tools/checkstyle:checkstyle.bzl", "checkstyle_test") +# THIS FILE IS AUTO-GENERATED + +package(default_visibility = ["//visibility:public"]) -# You can use these 3 bazel build targets: -# -# 1. Builds hello_server in container: -# bazel build //examples/docker/hello_server -# -# 2. Builds hello_server on bare metal: -# bazel build //examples/docker/hello_server.binary -# -# 3. Load image to local registry: -# bazel run //examples/docker:hello_server -- --norun -# -# 4. Alternative to 3: -# bazel build //examples/docker:hello_server.tar -# To load to local registry: -# $ docker load -i bazel-bin/examples/docker/hello_server.tar -# 3012758200ff: Loading layer [=================================================>] 18.12MB/18.12MB -# 2986b553e1e9: Loading layer [=================================================>] 1.956MB/1.956MB -# 418f0d19e9db: Loading layer [=================================================>] 102.4MB/102.4MB -# c0e10e23215d: Loading layer [=================================================>] 20.48kB/20.48kB -# -# $ docker images -# REPOSITORY TAG IMAGE ID CREATED SIZE -# bazel/examples/docker hello_server beb07c1df42a 48 years ago 121MB +load("//tools/checkstyle:checkstyle.bzl", "checkstyle_test") -java_image( +java_binary( name = "hello_server", srcs = ["HelloServer.java"], - base = "@alpine_java_git//image", main_class = "com.google.startupos.examples.docker.HelloServer", + deps = ["//third_party/maven/com/google/flogger:flogger_system_backend"], ) checkstyle_test( - name = "hello_server.binary-checkstyle", - target = ":hello_server.binary", -) - -load("@io_bazel_rules_docker//container:container.bzl", "container_push") - -# To push the container to a container registry, such as Google's gcr.io, update -# the container_push rule below to use your projects repository, e.g. "my-gcloud-project-id/hello-server". -# -# First make sure everything is set up: -# https://cloud.google.com/container-registry/docs/pushing-and-pulling -# -# Then run: -# -# $ bazel run //examples/docker:push_hello_server -# -# Once pushed, this image can be used in kubernetes and will be named like: -# gcr.io/startup-os/hello-server:latest - -container_push( - name = "push_hello_server", - format = "Docker", - image = ":hello_server", - registry = "gcr.io", - repository = "startup-os/hello-server", - tag = "latest", + name = "hello_server-checkstyle", + target = ":hello_server", ) diff --git a/examples/errorprone/BUILD b/examples/errorprone/BUILD index 9acb6d3ec..862dd7d1c 100644 --- a/examples/errorprone/BUILD +++ b/examples/errorprone/BUILD @@ -1,48 +1,47 @@ +# THIS FILE IS AUTO-GENERATED + +package(default_visibility = ["//visibility:public"]) + load("//tools/checkstyle:checkstyle.bzl", "checkstyle_test") -java_plugin( - name = "StringFmtInPrintMethodsCheckPlugin", - srcs = ["StringFmtInPrintMethodsCheck.java"], +java_library( + name = "protobuf_check", + srcs = ["ProtobufCheck.java"], deps = [ "//third_party/maven/com/google/auto/service:auto_service", "//third_party/maven/com/google/errorprone:error_prone_ant", - "//third_party/maven/com/google/guava", + "//third_party/maven/com/google/protobuf:protobuf_java", ], ) checkstyle_test( - name = "StringFmtInPrintMethodsCheckPlugin-checkstyle", - target = ":StringFmtInPrintMethodsCheckPlugin", + name = "protobuf_check-checkstyle", + target = ":protobuf_check", ) -java_plugin( - name = "ProtobufCheckPlugin", - srcs = ["ProtobufCheck.java"], +java_library( + name = "string_fmt_in_print_methods_check", + srcs = ["StringFmtInPrintMethodsCheck.java"], deps = [ "//third_party/maven/com/google/auto/service:auto_service", "//third_party/maven/com/google/errorprone:error_prone_ant", "//third_party/maven/com/google/guava", - "//third_party/maven/com/google/protobuf:protobuf_java", ], ) checkstyle_test( - name = "ProtobufCheckPlugin-checkstyle", - target = ":ProtobufCheckPlugin", + name = "string_fmt_in_print_methods_check-checkstyle", + target = ":string_fmt_in_print_methods_check", ) java_binary( - name = "Hello", + name = "hello", srcs = ["Hello.java"], main_class = "com.google.startupos.examples.errorprone.Hello", - plugins = [ - ":StringFmtInPrintMethodsCheckPlugin", - ":ProtobufCheckPlugin", - ], - deps = ["//examples/proto_vs_json:data_java_proto"], + deps = ["//third_party/maven/com/google/flogger:flogger_system_backend"], ) checkstyle_test( - name = "Hello-checkstyle", - target = ":Hello", + name = "hello-checkstyle", + target = ":hello", ) diff --git a/tools/build_file_generator/BUILD b/tools/build_file_generator/BUILD index 1e0a1bda5..62bddf608 100644 --- a/tools/build_file_generator/BUILD +++ b/tools/build_file_generator/BUILD @@ -1,3 +1,5 @@ +# THIS FILE IS AUTO-GENERATED + package(default_visibility = ["//visibility:public"]) load("//tools/checkstyle:checkstyle.bzl", "checkstyle_test") @@ -138,60 +140,8 @@ java_binary( ":third_party_deps_analyzer", "//common", "//common:dagger_with_annotation_processor", - "//third_party/maven/com/google/api:api_common", - "//third_party/maven/com/google/auth:google_auth_library_credentials", - "//third_party/maven/com/google/auth:google_auth_library_oauth2_http", - "//third_party/maven/com/google/auto:auto_common", - "//third_party/maven/com/google/auto/factory:auto_factory", - "//third_party/maven/com/google/auto/service:auto_service", - "//third_party/maven/com/google/auto/service:auto_service_plugin", - "//third_party/maven/com/google/auto/value:auto_value", - "//third_party/maven/com/google/auto/value:auto_value_annotations", - "//third_party/maven/com/google/auto/value:auto_value_plugin", - "//third_party/maven/com/google/cloud:google_cloud_core", - "//third_party/maven/com/google/cloud:google_cloud_core_grpc", - "//third_party/maven/com/google/cloud:google_cloud_firestore", - "//third_party/maven/com/google/code/findbugs:jsr305", - "//third_party/maven/com/google/code/gson", - "//third_party/maven/com/google/dagger", - "//third_party/maven/com/google/dagger:dagger_compiler", - "//third_party/maven/com/google/errorprone:error_prone_ant", - "//third_party/maven/com/google/firebase:firebase_admin", - "//third_party/maven/com/google/flogger", "//third_party/maven/com/google/flogger:flogger_system_backend", - "//third_party/maven/com/google/googlejavaformat:google_java_format", - "//third_party/maven/com/google/guava", - "//third_party/maven/com/google/jimfs", - "//third_party/maven/com/google/protobuf:protobuf_java", - "//third_party/maven/com/google/protobuf:protobuf_java_util", - "//third_party/maven/com/jcraft:jsch", - "//third_party/maven/com/puppycrawl/tools:checkstyle", - "//third_party/maven/com/squareup/okhttp", - "//third_party/maven/com/squareup/okio", - "//third_party/maven/commons_logging", - "//third_party/maven/io/grpc:grpc_core", - "//third_party/maven/io/grpc:grpc_netty", - "//third_party/maven/io/grpc:grpc_protobuf", - "//third_party/maven/io/grpc:grpc_services", - "//third_party/maven/io/grpc:grpc_stub", - "//third_party/maven/io/netty:netty_codec_http2", - "//third_party/maven/io/netty:netty_tcnative_boringssl_static", - "//third_party/maven/io/opencensus:opencensus_contrib_grpc_metrics", - "//third_party/maven/javax/annotation:javax_annotation_api", "//third_party/maven/javax/inject:javax_inject", - "//third_party/maven/junit", - "//third_party/maven/org/apache/commons:commons_csv", - "//third_party/maven/org/apache/commons:commons_lang3", - "//third_party/maven/org/apache/httpcomponents:fluent_hc", - "//third_party/maven/org/apache/pdfbox", - "//third_party/maven/org/apache/pdfbox:fontbox", - "//third_party/maven/org/javassist", - "//third_party/maven/org/json", - "//third_party/maven/org/jsoup", - "//third_party/maven/org/mockito:mockito_core", - "//third_party/maven/org/objenesis", - "//third_party/maven/org/slf4j:slf4j_simple", - "//third_party/maven/org/yaml:snakeyaml", ], ) diff --git a/tools/deps/BUILD b/tools/deps/BUILD index afca09cb9..c46924863 100644 --- a/tools/deps/BUILD +++ b/tools/deps/BUILD @@ -1,8 +1,8 @@ -load("//tools/checkstyle:checkstyle.bzl", "checkstyle_test") +# THIS FILE IS AUTO-GENERATED + +package(default_visibility = ["//visibility:public"]) -exports_files([ - "whitelist.yaml", -]) +load("//tools/checkstyle:checkstyle.bzl", "checkstyle_test") proto_library( name = "dependencies_proto", @@ -14,74 +14,68 @@ java_proto_library( deps = [":dependencies_proto"], ) -java_test( - name = "MavenDepsWhitelistTest", - srcs = ["MavenDepsWhitelistTest.java"], - data = [ - "//:dependencies.yaml", - "//tools/deps:whitelist.yaml", - ], - test_class = "com.google.startupos.tools.deps.MavenDepsWhitelistTest", +java_binary( + name = "workspace_patcher", + srcs = ["WorkspacePatcher.java"], + main_class = "com.google.startupos.tools.deps.WorkspacePatcher", deps = [ - "//third_party/maven/org/yaml:snakeyaml", + "//common/flags", + "//third_party/maven/com/google/flogger:flogger_system_backend", ], ) checkstyle_test( - name = "MavenDepsWhitelistTest-checkstyle", - target = ":MavenDepsWhitelistTest", + name = "workspace_patcher-checkstyle", + target = ":workspace_patcher", ) java_test( - name = "WorkspaceDepsWhitelistTest", - srcs = ["WorkspaceDepsWhitelistTest.java"], - data = [ - "//:WORKSPACE", - "//tools/deps:whitelist.yaml", - ], - test_class = "com.google.startupos.tools.deps.WorkspaceDepsWhitelistTest", + name = "maven_deps_whitelist_test", + srcs = ["MavenDepsWhitelistTest.java"], + test_class = "com.google.startupos.tools.deps.MavenDepsWhitelistTest", deps = [ - "//third_party/maven/org/apache/commons:commons_lang3", + "//third_party/maven/com/google/flogger:flogger_system_backend", + "//third_party/maven/junit", "//third_party/maven/org/yaml:snakeyaml", ], ) checkstyle_test( - name = "WorkspaceDepsWhitelistTest-checkstyle", - target = ":WorkspaceDepsWhitelistTest", + name = "maven_deps_whitelist_test-checkstyle", + target = ":maven_deps_whitelist_test", ) java_test( - name = "PackageLockWhitelistTest", + name = "package_lock_whitelist_test", srcs = ["PackageLockWhitelistTest.java"], - data = [ - "//third_party/maven:package-lock.bzl", - "//tools/deps:whitelist.yaml", - ], test_class = "com.google.startupos.tools.deps.PackageLockWhitelistTest", deps = [ ":dependencies_java_proto", + "//third_party/maven/com/google/flogger:flogger_system_backend", "//third_party/maven/com/google/protobuf:protobuf_java_util", + "//third_party/maven/junit", "//third_party/maven/org/yaml:snakeyaml", ], ) checkstyle_test( - name = "PackageLockWhitelistTest-checkstyle", - target = ":PackageLockWhitelistTest", + name = "package_lock_whitelist_test-checkstyle", + target = ":package_lock_whitelist_test", ) -java_binary( - name = "workspace_patcher", - srcs = ["WorkspacePatcher.java"], - main_class = "com.google.startupos.tools.deps.WorkspacePatcher", +java_test( + name = "workspace_deps_whitelist_test", + srcs = ["WorkspaceDepsWhitelistTest.java"], + test_class = "com.google.startupos.tools.deps.WorkspaceDepsWhitelistTest", deps = [ - "//common/flags", "//third_party/maven/com/google/flogger:flogger_system_backend", + "//third_party/maven/junit", + "//third_party/maven/org/apache/commons:commons_lang3", + "//third_party/maven/org/yaml:snakeyaml", ], ) checkstyle_test( - name = "workspace_patcher-checkstyle", - target = ":workspace_patcher", + name = "workspace_deps_whitelist_test-checkstyle", + target = ":workspace_deps_whitelist_test", ) diff --git a/tools/formatter/BUILD b/tools/formatter/BUILD index 84c18c5cd..ec0c9c196 100644 --- a/tools/formatter/BUILD +++ b/tools/formatter/BUILD @@ -1,35 +1,22 @@ +# THIS FILE IS AUTO-GENERATED + package(default_visibility = ["//visibility:public"]) load("//tools/checkstyle:checkstyle.bzl", "checkstyle_test") java_binary( - name = "formatter", + name = "formatter_tool", srcs = ["FormatterTool.java"], main_class = "com.google.startupos.tools.formatter.FormatterTool", - runtime_deps = [ - ":clang_format", - "//tools:buildifier", - "//tools:shfmt", - ], deps = [ "//common/flags", "//third_party/maven/com/google/flogger:flogger_system_backend", "//third_party/maven/com/google/googlejavaformat:google_java_format", "//third_party/maven/com/google/guava", - "//third_party/maven/org/slf4j:slf4j_simple", ], ) checkstyle_test( - name = "formatter-checkstyle", - target = ":formatter", -) - -sh_binary( - name = "clang_format", - srcs = ["clang-format.sh"], - data = [ - "@clang_format_bin//file", - "@clang_format_bin_osx//file", - ], + name = "formatter_tool-checkstyle", + target = ":formatter_tool", ) diff --git a/tools/reviewer/BUILD b/tools/reviewer/BUILD index 7f9e4e937..fb4012ee3 100644 --- a/tools/reviewer/BUILD +++ b/tools/reviewer/BUILD @@ -1,22 +1,22 @@ +# THIS FILE IS AUTO-GENERATED + package(default_visibility = ["//visibility:public"]) load("//tools/checkstyle:checkstyle.bzl", "checkstyle_test") -exports_files(["global_registry.prototxt"]) - proto_library( name = "reviewer_proto", srcs = ["reviewer.proto"], ) -java_proto_library( - name = "reviewer_java_proto", - deps = [":reviewer_proto"], -) - proto_library( name = "reviewer_registry_proto", srcs = ["reviewer_registry.proto"], + deps = ["//tools/reviewer:reviewer_proto"], +) + +java_proto_library( + name = "reviewer_java_proto", deps = [":reviewer_proto"], ) @@ -36,47 +36,39 @@ checkstyle_test( ) java_test( - name = "GlobalRegistryTest", - srcs = [ - "GlobalRegistryTest.java", - ], - data = ["//tools/reviewer:global_registry.prototxt"], + name = "global_registry_test", + srcs = ["GlobalRegistryTest.java"], test_class = "com.google.startupos.tools.reviewer.GlobalRegistryTest", deps = [ - ":reviewer_java_proto", ":reviewer_registry_java_proto", "//common", "//common:dagger_with_annotation_processor", - "//third_party/maven/com/google/guava", - "//third_party/maven/javax/annotation:javax_annotation_api", + "//third_party/maven/com/google/flogger:flogger_system_backend", "//third_party/maven/javax/inject:javax_inject", + "//third_party/maven/junit", ], ) checkstyle_test( - name = "GlobalRegistryTest-checkstyle", - target = ":GlobalRegistryTest", + name = "global_registry_test-checkstyle", + target = ":global_registry_test", ) java_test( - name = "ReviewerConfigTest", - srcs = [ - "ReviewerConfigTest.java", - ], - data = ["//:reviewer_config.prototxt"], + name = "reviewer_config_test", + srcs = ["ReviewerConfigTest.java"], test_class = "com.google.startupos.tools.reviewer.ReviewerConfigTest", deps = [ ":reviewer_java_proto", - ":reviewer_registry_java_proto", "//common", "//common:dagger_with_annotation_processor", - "//third_party/maven/com/google/guava", - "//third_party/maven/javax/annotation:javax_annotation_api", + "//third_party/maven/com/google/flogger:flogger_system_backend", "//third_party/maven/javax/inject:javax_inject", + "//third_party/maven/junit", ], ) checkstyle_test( - name = "ReviewerConfigTest-checkstyle", - target = ":ReviewerConfigTest", + name = "reviewer_config_test-checkstyle", + target = ":reviewer_config_test", ) diff --git a/tools/reviewer/aa/commands/BUILD b/tools/reviewer/aa/commands/BUILD index 8130b3e6e..8acdf3c45 100644 --- a/tools/reviewer/aa/commands/BUILD +++ b/tools/reviewer/aa/commands/BUILD @@ -1,43 +1,213 @@ +# THIS FILE IS AUTO-GENERATED + package(default_visibility = ["//visibility:public"]) load("//tools/checkstyle:checkstyle.bzl", "checkstyle_test") java_library( - name = "commands", - srcs = glob([ - "*.java", - "checks/*.java", - ]), - runtime_deps = [ - "//tools:buildifier", - "//tools/formatter:clang_format", + name = "aa_command", + srcs = ["AaCommand.java"], +) + +checkstyle_test( + name = "aa_command-checkstyle", + target = ":aa_command", +) + +java_library( + name = "add_repo_command", + srcs = ["AddRepoCommand.java"], + deps = [ + ":aa_command", + "//common", + "//common/flags", + "//common/repo", + "//third_party/maven/javax/inject:javax_inject", + "//tools/reviewer/aa:config_java_proto", ], +) + +checkstyle_test( + name = "add_repo_command-checkstyle", + target = ":add_repo_command", +) + +java_library( + name = "diff_command", + srcs = ["DiffCommand.java"], deps = [ + ":aa_command", "//common", - "//common:dagger_with_annotation_processor", - "//common/firestore", "//common/flags", "//common/repo", - "//common/repo:repo_java_proto", "//third_party/maven/com/google/guava", - "//third_party/maven/com/google/protobuf:protobuf_java", "//third_party/maven/io/grpc:grpc_core", - "//third_party/maven/io/grpc:grpc_netty", - "//third_party/maven/io/grpc:grpc_stub", - "//third_party/maven/io/opencensus:opencensus_contrib_grpc_metrics", "//third_party/maven/javax/inject:javax_inject", - "//tools/formatter", + "//tools/reviewer/local_server/service:code_review_java_grpc", + "//tools/reviewer/local_server/service:code_review_java_proto", + ], +) + +checkstyle_test( + name = "diff_command-checkstyle", + target = ":diff_command", +) + +java_library( + name = "fix_command", + srcs = ["FixCommand.java"], + deps = [ + ":aa_command", + "//third_party/maven/com/google/guava", + "//third_party/maven/javax/inject:javax_inject", + "//tools/reviewer/aa/commands/checks:fix_command_check", + "//tools/reviewer/aa/commands/checks:formatting_check", + ], +) + +checkstyle_test( + name = "fix_command-checkstyle", + target = ":fix_command", +) + +java_library( + name = "init_command", + srcs = ["InitCommand.java"], + deps = [ + ":aa_command", + "//common", + "//common/flags", + "//common/repo", + "//third_party/maven/javax/inject:javax_inject", "//tools/reviewer:reviewer_registry_java_proto", + ], +) + +checkstyle_test( + name = "init_command-checkstyle", + target = ":init_command", +) + +java_library( + name = "kill_server_command", + srcs = ["KillServerCommand.java"], + deps = [ + ":aa_command", + "//common", + "//third_party/maven/javax/inject:javax_inject", + ], +) + +checkstyle_test( + name = "kill_server_command-checkstyle", + target = ":kill_server_command", +) + +java_library( + name = "patch_command", + srcs = ["PatchCommand.java"], + deps = [ + ":aa_command", + "//common", + "//common/flags", + "//common/repo", + "//third_party/maven/javax/inject:javax_inject", + ], +) + +checkstyle_test( + name = "patch_command-checkstyle", + target = ":patch_command", +) + +java_library( + name = "review_command", + srcs = ["ReviewCommand.java"], + deps = [ + ":aa_command", + "//common", + "//common/repo", + "//third_party/maven/io/grpc:grpc_core", + "//third_party/maven/javax/inject:javax_inject", "//tools/reviewer/aa:config_java_proto", - "//tools/reviewer/local_server/service:auth_service_java_grpc", - "//tools/reviewer/local_server/service:auth_service_java_proto", "//tools/reviewer/local_server/service:code_review_java_grpc", "//tools/reviewer/local_server/service:code_review_java_proto", - "//tools/reviewer/local_server/service:code_review_service", ], ) checkstyle_test( - name = "commands-checkstyle", - target = ":commands", + name = "review_command-checkstyle", + target = ":review_command", +) + +java_library( + name = "snapshot_command", + srcs = ["SnapshotCommand.java"], + deps = [ + ":aa_command", + "//common", + "//common/repo", + "//common/repo:repo_java_proto", + "//third_party/maven/com/google/guava", + "//third_party/maven/io/grpc:grpc_core", + "//third_party/maven/javax/inject:javax_inject", + "//tools/reviewer/local_server/service:code_review_java_grpc", + ], +) + +checkstyle_test( + name = "snapshot_command-checkstyle", + target = ":snapshot_command", +) + +java_library( + name = "submit_command", + srcs = ["SubmitCommand.java"], + deps = [ + ":aa_command", + "//common", + "//common/repo", + "//third_party/maven/io/grpc:grpc_core", + "//third_party/maven/javax/inject:javax_inject", + "//tools/reviewer/local_server/service:code_review_java_grpc", + "//tools/reviewer/local_server/service:code_review_java_proto", + ], +) + +checkstyle_test( + name = "submit_command-checkstyle", + target = ":submit_command", +) + +java_library( + name = "sync_command", + srcs = ["SyncCommand.java"], + deps = [ + ":aa_command", + "//common", + "//common/repo", + "//third_party/maven/javax/inject:javax_inject", + ], +) + +checkstyle_test( + name = "sync_command-checkstyle", + target = ":sync_command", +) + +java_library( + name = "workspace_command", + srcs = ["WorkspaceCommand.java"], + deps = [ + ":aa_command", + "//common", + "//common/flags", + "//third_party/maven/javax/inject:javax_inject", + "//tools/reviewer/aa:config_java_proto", + ], +) + +checkstyle_test( + name = "workspace_command-checkstyle", + target = ":workspace_command", ) diff --git a/tools/reviewer/job/BUILD b/tools/reviewer/job/BUILD index a66e9e44c..4a9bee77b 100644 --- a/tools/reviewer/job/BUILD +++ b/tools/reviewer/job/BUILD @@ -1,65 +1,34 @@ -load("@io_bazel_rules_docker//java:image.bzl", "java_image") -load("@io_bazel_rules_docker//container:container.bzl", "container_push") -load("//tools/checkstyle:checkstyle.bzl", "checkstyle_test") - -JOB_DEPS = [ - "//common", - "//common:dagger_with_annotation_processor", - "//common/firestore", - "//common/flags", - "//common/repo", - "//tools/reviewer/job/tasks:ci_task", - "//tools/reviewer/job/tasks:submitter_task", - "//tools/reviewer/job/tasks:reviewer_metadata_updater_task", - "//tools/reviewer/job/tasks:task_executor", - "//third_party/maven/com/google/auth:google_auth_library_credentials", - "//third_party/maven/com/google/auth:google_auth_library_oauth2_http", - "//third_party/maven/com/google/flogger", - "//third_party/maven/com/google/flogger:flogger_system_backend", - "//third_party/maven/javax/inject:javax_inject", - "//third_party/maven/io/grpc:grpc_services", - "//third_party/maven/org/apache/commons:commons_lang3", - "//tools/reviewer:reviewer_java_proto", - "//tools/reviewer:reviewer_registry_java_proto", - "//tools/reviewer/aa:aa_module", - "//tools/reviewer/aa/commands", - "//tools/reviewer/local_server", - "//third_party/maven/com/google/guava", - "//tools/reviewer/local_server:local_http_gateway", - "//tools/reviewer/local_server/service:code_review_service", - "//tools/reviewer/local_server/service:code_review_java_proto", -] +# THIS FILE IS AUTO-GENERATED -java_binary( - name = "job", - srcs = ["ReviewerJob.java"], - main_class = "com.google.startupos.tools.reviewer.job.ReviewerJob", - deps = JOB_DEPS, -) +package(default_visibility = ["//visibility:public"]) -checkstyle_test( - name = "job-checkstyle", - target = ":job", -) +load("//tools/checkstyle:checkstyle.bzl", "checkstyle_test") -java_image( - name = "job_image", +java_binary( + name = "reviewer_job", srcs = ["ReviewerJob.java"], - base = "@alpine_java_git//image", main_class = "com.google.startupos.tools.reviewer.job.ReviewerJob", - deps = JOB_DEPS, + deps = [ + "//common", + "//common:dagger_with_annotation_processor", + "//common/firestore", + "//common/flags", + "//third_party/maven/com/google/flogger:flogger_system_backend", + "//third_party/maven/com/google/guava", + "//third_party/maven/javax/inject:javax_inject", + "//tools/reviewer/aa:aa_module", + "//tools/reviewer/aa/commands", + "//tools/reviewer/job/tasks:ci_task", + "//tools/reviewer/job/tasks:reviewer_metadata_updater_task", + "//tools/reviewer/job/tasks:submitter_task", + "//tools/reviewer/job/tasks:task_executor", + "//tools/reviewer/local_server", + "//tools/reviewer/local_server:local_http_gateway", + "//tools/reviewer/local_server/service:code_review_service", + ], ) checkstyle_test( - name = "job_image.binary-checkstyle", - target = ":job_image.binary", -) - -container_push( - name = "push_job", - format = "Docker", - image = ":job_image", - registry = "gcr.io", - repository = "startup-os/reviewer", - tag = "latest", + name = "reviewer_job-checkstyle", + target = ":reviewer_job", ) diff --git a/tools/reviewer/job/sync/tests/BUILD b/tools/reviewer/job/sync/tests/BUILD index 2b5aab6b7..a7518c3a4 100644 --- a/tools/reviewer/job/sync/tests/BUILD +++ b/tools/reviewer/job/sync/tests/BUILD @@ -1,41 +1,21 @@ +# THIS FILE IS AUTO-GENERATED + package(default_visibility = ["//visibility:public"]) load("//tools/checkstyle:checkstyle.bzl", "checkstyle_test") -java_test( - name = "line_number_converter_test", - srcs = [ - "LineNumberConverterTest.java", - ], - test_class = "com.google.startupos.tools.reviewer.job.sync.tests.LineNumberConverterTest", - deps = [ - "//common", - "//third_party/maven/junit", - "//tools/reviewer/job/sync:github_sync", - "//tools/reviewer/job/sync:line_number_converter", - ], -) - -checkstyle_test( - name = "line_number_converter_test-checkstyle", - target = ":line_number_converter_test", -) - java_test( name = "diff_converter_test", srcs = ["DiffConverterTest.java"], test_class = "com.google.startupos.tools.reviewer.job.sync.tests.DiffConverterTest", deps = [ - "//common", "//common/repo", - "//common/repo:repo_java_proto", "//third_party/maven/com/google/flogger:flogger_system_backend", "//third_party/maven/com/google/guava", "//third_party/maven/junit", "//third_party/maven/org/mockito:mockito_core", "//tools/reviewer/job/sync:diff_converter", "//tools/reviewer/job/sync:full_github_pr_java_proto", - "//tools/reviewer/job/sync:github_sync", "//tools/reviewer/job/sync:reviewer_client", "//tools/reviewer/local_server/service:code_review_java_proto", ], @@ -45,3 +25,19 @@ checkstyle_test( name = "diff_converter_test-checkstyle", target = ":diff_converter_test", ) + +java_test( + name = "line_number_converter_test", + srcs = ["LineNumberConverterTest.java"], + test_class = "com.google.startupos.tools.reviewer.job.sync.tests.LineNumberConverterTest", + deps = [ + "//third_party/maven/com/google/flogger:flogger_system_backend", + "//third_party/maven/junit", + "//tools/reviewer/job/sync:line_number_converter", + ], +) + +checkstyle_test( + name = "line_number_converter_test-checkstyle", + target = ":line_number_converter_test", +) diff --git a/tools/reviewer/local_server/BUILD b/tools/reviewer/local_server/BUILD index 6af960d88..f8cc472c2 100644 --- a/tools/reviewer/local_server/BUILD +++ b/tools/reviewer/local_server/BUILD @@ -1,52 +1,31 @@ +# THIS FILE IS AUTO-GENERATED + package(default_visibility = ["//visibility:public"]) load("//tools/checkstyle:checkstyle.bzl", "checkstyle_test") -java_binary( - name = "local_server", - srcs = [ - "LocalServer.java", - ], - data = [ - "web_login/index.html", - ], - main_class = "com.google.startupos.tools.reviewer.local_server.LocalServer", +java_library( + name = "local_http_gateway", + srcs = ["LocalHttpGateway.java"], deps = [ - ":local_http_gateway", - "//common", - "//common:dagger_with_annotation_processor", - "//common/flags", - "//common/repo", + ":local_http_gateway_grpc_client", "//third_party/maven/com/google/flogger", - "//third_party/maven/com/google/flogger:flogger_system_backend", - "//third_party/maven/io/grpc:grpc_core", - "//third_party/maven/io/grpc:grpc_netty", - "//third_party/maven/io/grpc:grpc_services", - "//third_party/maven/io/netty:netty_tcnative_boringssl_static", - "//third_party/maven/io/opencensus:opencensus_contrib_grpc_metrics", - "//third_party/maven/javax/inject:javax_inject", - "//tools/reviewer/aa:aa_module", - "//tools/reviewer/aa:config_java_proto", - "//tools/reviewer/local_server/service:auth_service", - "//tools/reviewer/local_server/service:code_review_service", + "//third_party/maven/com/google/guava", + "//third_party/maven/org/json", + "//tools/reviewer/local_server/service:code_review_java_proto", ], ) checkstyle_test( - name = "local_server-checkstyle", - target = ":local_server", + name = "local_http_gateway-checkstyle", + target = ":local_http_gateway", ) java_library( name = "local_http_gateway_grpc_client", - srcs = [ - "LocalHttpGatewayGrpcClient.java", - ], + srcs = ["LocalHttpGatewayGrpcClient.java"], deps = [ "//third_party/maven/io/grpc:grpc_core", - "//third_party/maven/io/grpc:grpc_netty", - "//third_party/maven/io/opencensus:opencensus_contrib_grpc_metrics", - "//tools/reviewer/local_server/service:auth_service_java_grpc", "//tools/reviewer/local_server/service:auth_service_java_proto", "//tools/reviewer/local_server/service:code_review_java_grpc", "//tools/reviewer/local_server/service:code_review_java_proto", @@ -58,23 +37,28 @@ checkstyle_test( target = ":local_http_gateway_grpc_client", ) -java_library( - name = "local_http_gateway", - srcs = [ - "LocalHttpGateway.java", - ], +java_binary( + name = "local_server", + srcs = ["LocalServer.java"], + main_class = "com.google.startupos.tools.reviewer.local_server.LocalServer", deps = [ - ":local_http_gateway_grpc_client", - "//common/repo:repo_java_proto", + ":local_http_gateway", + "//common", + "//common:dagger_with_annotation_processor", + "//common/flags", + "//common/repo", "//third_party/maven/com/google/flogger", "//third_party/maven/com/google/flogger:flogger_system_backend", - "//third_party/maven/com/google/guava", - "//third_party/maven/org/json", - "//tools/reviewer/local_server/service:code_review_java_proto", + "//third_party/maven/io/grpc:grpc_core", + "//third_party/maven/io/grpc:grpc_services", + "//third_party/maven/javax/inject:javax_inject", + "//tools/reviewer/aa:aa_module", + "//tools/reviewer/local_server/service:auth_service", + "//tools/reviewer/local_server/service:code_review_service", ], ) checkstyle_test( - name = "local_http_gateway-checkstyle", - target = ":local_http_gateway", + name = "local_server-checkstyle", + target = ":local_server", )