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 "//third_party/java/error_prone:annotations", 72 "@maven//:com_google_auto_value_auto_value_annotations", 73 ], 74) 75 76java_plugin( 77 name = "auto_factory_processor", 78 generates_api = 1, 79 processor_class = "com.google.auto.factory.processor.AutoFactoryProcessor", 80 visibility = ["//visibility:private"], 81 deps = [ 82 ":common", 83 ":service", 84 "//third_party/java/google_java_format", 85 "//third_party/java/guava", 86 "//third_party/java/javapoet", 87 "@maven//:com_google_auto_factory_auto_factory", 88 ], 89) 90 91java_library( 92 name = "factory", 93 exported_plugins = [":auto_factory_processor"], 94 exports = ["@maven//:com_google_auto_factory_auto_factory"], 95) 96 97java_plugin( 98 name = "auto_service_processor", 99 processor_class = "com.google.auto.service.processor.AutoServiceProcessor", 100 visibility = ["//visibility:private"], 101 deps = [ 102 ":common", 103 "//third_party/java/guava", 104 "@maven//:com_google_auto_service_auto_service", 105 "@maven//:com_google_auto_service_auto_service_annotations", 106 ], 107) 108 109java_library( 110 name = "service", 111 exported_plugins = [":auto_service_processor"], 112 tags = ["maven:compile_only"], 113 exports = ["@maven//:com_google_auto_service_auto_service_annotations"], 114) 115