1# Copyright (C) 2021 The Dagger Authors. 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15# BUILD rules for https://github.com/google/auto 16 17load("@rules_java//java:defs.bzl", "java_library", "java_plugin") 18 19package(default_visibility = ["//:src"]) 20 21alias( 22 name = "common", 23 actual = "@maven//:com_google_auto_auto_common", 24) 25 26java_plugin( 27 name = "auto_value_processor", 28 processor_class = "com.google.auto.value.processor.AutoValueProcessor", 29 visibility = ["//visibility:private"], 30 deps = [ 31 ":common", 32 ":service", 33 "//third_party/java/guava", 34 "@maven//:com_google_auto_value_auto_value", 35 ], 36) 37 38java_plugin( 39 name = "auto_annotation_processor", 40 processor_class = "com.google.auto.value.processor.AutoAnnotationProcessor", 41 visibility = ["//visibility:private"], 42 deps = [ 43 ":common", 44 ":service", 45 "//third_party/java/guava", 46 "@maven//:com_google_auto_value_auto_value", 47 ], 48) 49 50java_plugin( 51 name = "auto_oneof_processor", 52 processor_class = "com.google.auto.value.processor.AutoOneOfProcessor", 53 visibility = ["//visibility:private"], 54 deps = [ 55 ":common", 56 ":service", 57 "//third_party/java/guava", 58 "@maven//:com_google_auto_value_auto_value", 59 ], 60) 61 62java_library( 63 name = "value", 64 exported_plugins = [ 65 ":auto_annotation_processor", 66 ":auto_oneof_processor", 67 ":auto_value_processor", 68 ], 69 tags = ["maven:compile_only"], 70 exports = [ 71 "@maven//:com_google_auto_value_auto_value_annotations", 72 ], 73) 74 75java_plugin( 76 name = "auto_factory_processor", 77 generates_api = 1, 78 processor_class = "com.google.auto.factory.processor.AutoFactoryProcessor", 79 visibility = ["//visibility:private"], 80 deps = [ 81 ":common", 82 ":service", 83 "//third_party/java/google_java_format", 84 "//third_party/java/guava", 85 "//third_party/java/javapoet", 86 "@maven//:com_google_auto_factory_auto_factory", 87 ], 88) 89 90java_library( 91 name = "factory", 92 exported_plugins = [":auto_factory_processor"], 93 exports = ["@maven//:com_google_auto_factory_auto_factory"], 94) 95 96java_plugin( 97 name = "auto_service_processor", 98 processor_class = "com.google.auto.service.processor.AutoServiceProcessor", 99 visibility = ["//visibility:private"], 100 deps = [ 101 ":common", 102 "//third_party/java/guava", 103 "@maven//:com_google_auto_service_auto_service", 104 "@maven//:com_google_auto_service_auto_service_annotations", 105 ], 106) 107 108java_library( 109 name = "service", 110 exported_plugins = [":auto_service_processor"], 111 tags = ["maven:compile_only"], 112 exports = ["@maven//:com_google_auto_service_auto_service_annotations"], 113) 114