Debian Codegraph @

core/src/com/google/inject/BUILD

raw
1 # Copyright 2011 Google Inc. All rights reserved.
2 # Author: [email protected] (Sam Berlin)
3 load("@rules_java//java:defs.bzl", "java_library")
4
5 package(
6 default_visibility = ["//:src"],
7 )
8
9 ANNOTATION_SRCS = [
10 "BindingAnnotation.java",
11 "Exposed.java",
12 "Inject.java",
13 "ProvidedBy.java",
14 "Provides.java",
15 "ScopeAnnotation.java",
16 "Singleton.java",
17 ]
18
19 IMPLEMENTED_BY_SRCS = [
20 "ImplementedBy.java",
21 ]
22
23 java_library(
24 name = "implemented_by",
25 srcs = IMPLEMENTED_BY_SRCS,
26 )
27
28 # TODO(lukes,user): It'd be nice if this wasn't one big rule.
29 # Unfortunately, splitting it apart would not be easy. We looked into
30 # it and the main issues appear to be:
31 # - Utility classes like internal/MoreTypes (choke point dependencies)
32 # - Cyclical dependencies between Binder and spi/Element
33 java_library(
34 name = "inject",
35 srcs = glob(
36 ["**/*.java"],
37 exclude = IMPLEMENTED_BY_SRCS + ANNOTATION_SRCS,
38 ),
39 plugins = [
40 ],
41 exports = [
42 ":annotations",
43 ":implemented_by",
44 ],
45 deps = [
46 # Warning: Be very careful adding new dependencies,
47 # These all have to mirrored in the open-source
48 # build (and jarjar'd up).
49 ":annotations",
50 ":implemented_by",
51 "//third_party/java/guava/annotations",
52 "//third_party/java/guava/base",
53 "//third_party/java/guava/cache",
54 "//third_party/java/guava/collect",
55 "//third_party/java/guava/primitives",
56 "//third_party/java/aopalliance",
57 "//third_party/java/asm",
58 "//third_party/java/error_prone:annotations",
59 "//third_party/java/jsr305_annotations",
60 "//third_party/java/jsr330_inject",
61 ],
62 )
63
64 java_library(
65 name = "annotations",
66 srcs = ANNOTATION_SRCS,
67 plugins = [
68 ],
69 deps = [
70 "//third_party/java/error_prone:annotations",
71 "//third_party/java/jsr330_inject",
72 ],
73 )
74
75 filegroup(
76 name = "javadoc-srcs",
77 srcs = glob(["**/*.java"]),
78 )