1# Copyright (C) 2017 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# Description: 16# Public Dagger API for Android 17 18load("@rules_java//java:defs.bzl", "java_library", "java_plugin") 19load( 20 "//:build_defs.bzl", 21 "DOCLINT_HTML_AND_SYNTAX", 22 "DOCLINT_REFERENCES", 23 "POM_VERSION", 24) 25load("//tools:maven.bzl", "pom_file") 26load("@google_bazel_common//tools/javadoc:javadoc.bzl", "javadoc_library") 27 28package(default_visibility = ["//:src"]) 29 30filegroup( 31 name = "srcs", 32 srcs = glob(["*.java"]), 33) 34 35java_library( 36 name = "processor", 37 srcs = [":srcs"], 38 javacopts = DOCLINT_HTML_AND_SYNTAX + DOCLINT_REFERENCES, 39 tags = ["maven_coordinates=com.google.dagger:dagger-android-processor:" + POM_VERSION], 40 deps = [ 41 "//java/dagger:core", 42 "//java/dagger/internal/codegen/langmodel", 43 "//java/dagger/spi", 44 "//third_party/java/auto:common", 45 "//third_party/java/auto:service", 46 "//third_party/java/auto:value", 47 "//third_party/java/google_java_format", 48 "//third_party/java/guava/base", 49 "//third_party/java/guava/collect", 50 "//third_party/java/incap", 51 "//third_party/java/javapoet", 52 ], 53) 54 55pom_file( 56 name = "pom", 57 artifact_id = "dagger-android-processor", 58 artifact_name = "Dagger Android Processor", 59 targets = [":processor"], 60) 61 62java_plugin( 63 name = "plugin", 64 generates_api = 1, 65 processor_class = "dagger.android.processor.AndroidProcessor", 66 deps = [":processor"], 67) 68 69javadoc_library( 70 name = "processor-javadoc", 71 srcs = [":srcs"], 72 root_packages = ["dagger.android.processor"], 73 deps = [":processor"], 74) 75