• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2020 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#   Annotation processor for Hilt.
17
18package(default_visibility = ["//:src"])
19
20java_plugin(
21    name = "plugin",
22    generates_api = 1,
23    processor_class = "dagger.hilt.processor.internal.root.RootProcessor",
24    deps = [
25        ":processor_lib",
26    ],
27)
28
29java_library(
30    name = "processor_lib",
31    srcs = [
32        "RootFileFormatter.java",
33        "RootGenerator.java",
34        "RootProcessor.java",
35        "TestComponentDataGenerator.java",
36        "TestComponentDataSupplierGenerator.java",
37        "TestInjectorGenerator.java",
38    ],
39    deps = [
40        ":root_metadata",
41        ":root_type",
42        "//java/dagger/hilt/processor/internal:base_processor",
43        "//java/dagger/hilt/processor/internal:classnames",
44        "//java/dagger/hilt/processor/internal:component_descriptor",
45        "//java/dagger/hilt/processor/internal:component_names",
46        "//java/dagger/hilt/processor/internal:processor_errors",
47        "//java/dagger/hilt/processor/internal:processors",
48        "//java/dagger/hilt/processor/internal/aggregateddeps:component_dependencies",
49        "//java/dagger/hilt/processor/internal/definecomponent:define_components",
50        "//java/dagger/hilt/processor/internal/generatesrootinput:generates_root_inputs",
51        "//java/dagger/internal/codegen/extension",
52        "//java/dagger/internal/guava:base",
53        "//java/dagger/internal/guava:collect",
54        "//java/dagger/internal/guava:graph",
55        "@google_bazel_common//third_party/java/auto:service",
56        "@google_bazel_common//third_party/java/incap",
57        "@google_bazel_common//third_party/java/javapoet",
58        "@maven//:com_google_auto_auto_common",
59    ],
60)
61
62java_library(
63    name = "root_metadata",
64    srcs = [
65        "Root.java",
66        "RootMetadata.java",
67        "TestRootMetadata.java",
68    ],
69    deps = [
70        ":root_type",
71        "//java/dagger/hilt/processor/internal:classnames",
72        "//java/dagger/hilt/processor/internal:component_descriptor",
73        "//java/dagger/hilt/processor/internal:kotlin",
74        "//java/dagger/hilt/processor/internal:processor_errors",
75        "//java/dagger/hilt/processor/internal:processors",
76        "//java/dagger/hilt/processor/internal/aggregateddeps:component_dependencies",
77        "//java/dagger/hilt/processor/internal/aliasof:alias_ofs",
78        "//java/dagger/internal/codegen/extension",
79        "//java/dagger/internal/codegen/kotlin",
80        "//java/dagger/internal/guava:base",
81        "//java/dagger/internal/guava:collect",
82        "@google_bazel_common//third_party/java/auto:value",
83        "@google_bazel_common//third_party/java/javapoet",
84        "@maven//:com_google_auto_auto_common",
85    ],
86)
87
88java_library(
89    name = "root_type",
90    srcs = ["RootType.java"],
91    deps = [
92        "//java/dagger/hilt/processor/internal:classnames",
93        "//java/dagger/hilt/processor/internal:processor_errors",
94        "//java/dagger/hilt/processor/internal:processors",
95        "@google_bazel_common//third_party/java/javapoet",
96    ],
97)
98
99filegroup(
100    name = "srcs_filegroup",
101    srcs = glob(["*"]),
102)
103