• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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#   An asynchronous dependency injection system that extends JSR-330.
17
18package(default_visibility = ["//:src"])
19
20load(
21    "//:build_defs.bzl",
22    "DOCLINT_HTML_AND_SYNTAX",
23    "DOCLINT_REFERENCES",
24    "SOURCE_7_TARGET_7",
25)
26load("//tools:maven.bzl", "pom_file", "POM_VERSION")
27
28# Work around b/70476182 which prevents Kythe from connecting :producers to the .java files it
29# contains.
30SRCS = glob(["**/*.java"])
31
32filegroup(
33    name = "producers-srcs",
34    srcs = SRCS,
35)
36
37java_library(
38    name = "producers",
39    srcs = SRCS,
40    javacopts = SOURCE_7_TARGET_7 + DOCLINT_HTML_AND_SYNTAX + DOCLINT_REFERENCES,
41    tags = ["maven_coordinates=com.google.dagger:dagger-producers:" + POM_VERSION],
42    exports = [
43        # TODO(dpb): Don't export any of Guava.
44        "@google_bazel_common//third_party/java/guava",
45        "@google_bazel_common//third_party/java/jsr330_inject",
46    ],
47    deps = [
48        "//java/dagger:core",
49        "@google_bazel_common//third_party/java/checker_framework_annotations",
50        "@google_bazel_common//third_party/java/error_prone:annotations",
51        "@google_bazel_common//third_party/java/guava",
52        "@google_bazel_common//third_party/java/jsr330_inject",
53    ],
54)
55
56pom_file(
57    name = "pom",
58    artifact_id = "dagger-producers",
59    artifact_name = "Dagger Producers",
60    targets = [":producers"],
61)
62
63load("@google_bazel_common//tools/javadoc:javadoc.bzl", "javadoc_library")
64
65javadoc_library(
66    name = "producers-javadoc",
67    srcs = SRCS,
68    exclude_packages = [
69        "dagger.producers.internal",
70        "dagger.producers.monitoring.internal",
71    ],
72    root_packages = ["dagger.producers"],
73    deps = [":producers"],
74)
75