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 = "component_tree_deps_plugin", 22 generates_api = 1, 23 processor_class = "dagger.hilt.processor.internal.root.ComponentTreeDepsProcessor", 24 deps = [ 25 ":component_tree_deps_processor_lib", 26 ], 27) 28 29java_library( 30 name = "component_tree_deps_processor_lib", 31 srcs = [ 32 "ComponentGenerator.java", 33 "ComponentTreeDepsProcessingStep.java", 34 "ComponentTreeDepsProcessor.java", 35 "EarlySingletonComponentCreatorGenerator.java", 36 "KspComponentTreeDepsProcessor.java", 37 "RootFileFormatter.java", 38 "RootGenerator.java", 39 "TestComponentDataGenerator.java", 40 ], 41 deps = [ 42 ":root_metadata", 43 "//java/dagger/hilt/android/processor/internal/androidentrypoint:android_generators", 44 "//java/dagger/hilt/android/processor/internal/androidentrypoint:metadata", 45 "//java/dagger/hilt/processor/internal:base_processor", 46 "//java/dagger/hilt/processor/internal:classnames", 47 "//java/dagger/hilt/processor/internal:compiler_options", 48 "//java/dagger/hilt/processor/internal:component_descriptor", 49 "//java/dagger/hilt/processor/internal:component_names", 50 "//java/dagger/hilt/processor/internal:processor_errors", 51 "//java/dagger/hilt/processor/internal:processors", 52 "//java/dagger/hilt/processor/internal/aggregateddeps:component_dependencies", 53 "//java/dagger/hilt/processor/internal/aliasof:alias_ofs", 54 "//java/dagger/hilt/processor/internal/definecomponent:define_components", 55 "//java/dagger/hilt/processor/internal/earlyentrypoint:aggregated_early_entry_point_metadata", 56 "//java/dagger/hilt/processor/internal/uninstallmodules:aggregated_uninstall_modules_metadata", 57 "//java/dagger/internal/codegen/extension", 58 "//java/dagger/internal/codegen/xprocessing", 59 "//third_party/java/auto:service", 60 "//third_party/java/error_prone:annotations", 61 "//third_party/java/guava/base", 62 "//third_party/java/guava/collect", 63 "//third_party/java/guava/graph", 64 "//third_party/java/incap", 65 "//third_party/java/javapoet", 66 "@maven//:com_google_devtools_ksp_symbol_processing_api", 67 ], 68) 69 70java_plugin( 71 name = "root_plugin", 72 generates_api = 1, 73 processor_class = "dagger.hilt.processor.internal.root.RootProcessor", 74 deps = [ 75 ":root_processor_lib", 76 ], 77) 78 79java_library( 80 name = "root_processor_lib", 81 srcs = [ 82 "AggregatedRootGenerator.java", 83 "ComponentTreeDepsGenerator.java", 84 "KspRootProcessor.java", 85 "ProcessedRootSentinelGenerator.java", 86 "RootProcessingStep.java", 87 "RootProcessor.java", 88 "TestInjectorGenerator.java", 89 ], 90 deps = [ 91 ":root_metadata", 92 ":root_type", 93 "//java/dagger/hilt/android/processor/internal/androidentrypoint:android_generators", 94 "//java/dagger/hilt/android/processor/internal/androidentrypoint:metadata", 95 "//java/dagger/hilt/processor/internal:aggregated_elements", 96 "//java/dagger/hilt/processor/internal:base_processor", 97 "//java/dagger/hilt/processor/internal:classnames", 98 "//java/dagger/hilt/processor/internal:compiler_options", 99 "//java/dagger/hilt/processor/internal:processor_errors", 100 "//java/dagger/hilt/processor/internal:processors", 101 "//java/dagger/hilt/processor/internal/aggregateddeps:component_dependencies", 102 "//java/dagger/hilt/processor/internal/aliasof:alias_ofs", 103 "//java/dagger/hilt/processor/internal/definecomponent:define_components", 104 "//java/dagger/hilt/processor/internal/earlyentrypoint:aggregated_early_entry_point_metadata", 105 "//java/dagger/hilt/processor/internal/generatesrootinput:generates_root_inputs", 106 "//java/dagger/hilt/processor/internal/root/ir", 107 "//java/dagger/hilt/processor/internal/uninstallmodules:aggregated_uninstall_modules_metadata", 108 "//java/dagger/internal/codegen/extension", 109 "//java/dagger/internal/codegen/xprocessing", 110 "//third_party/java/auto:service", 111 "//third_party/java/guava/base", 112 "//third_party/java/guava/collect", 113 "//third_party/java/incap", 114 "//third_party/java/javapoet", 115 "@maven//:com_google_devtools_ksp_symbol_processing_api", 116 ], 117) 118 119java_library( 120 name = "root_metadata", 121 srcs = [ 122 "AggregatedRootMetadata.java", 123 "ComponentTree.java", 124 "ComponentTreeDepsMetadata.java", 125 "ProcessedRootSentinelMetadata.java", 126 "Root.java", 127 "RootMetadata.java", 128 "TestRootMetadata.java", 129 ], 130 deps = [ 131 ":root_type", 132 "//java/dagger/hilt/processor/internal:aggregated_elements", 133 "//java/dagger/hilt/processor/internal:classnames", 134 "//java/dagger/hilt/processor/internal:component_descriptor", 135 "//java/dagger/hilt/processor/internal:processor_errors", 136 "//java/dagger/hilt/processor/internal:processors", 137 "//java/dagger/hilt/processor/internal/aggregateddeps:component_dependencies", 138 "//java/dagger/hilt/processor/internal/aliasof:alias_ofs", 139 "//java/dagger/hilt/processor/internal/kotlin", 140 "//java/dagger/hilt/processor/internal/root/ir", 141 "//java/dagger/internal/codegen/extension", 142 "//java/dagger/internal/codegen/xprocessing", 143 "//third_party/java/auto:common", 144 "//third_party/java/auto:value", 145 "//third_party/java/guava/base", 146 "//third_party/java/guava/collect", 147 "//third_party/java/guava/graph", 148 "//third_party/java/javapoet", 149 ], 150) 151 152java_library( 153 name = "root_type", 154 srcs = ["RootType.java"], 155 deps = [ 156 "//java/dagger/hilt/processor/internal:classnames", 157 "//java/dagger/hilt/processor/internal:processors", 158 "//java/dagger/internal/codegen/xprocessing", 159 "//third_party/java/javapoet", 160 ], 161) 162 163filegroup( 164 name = "srcs_filegroup", 165 srcs = glob(["*"]), 166) 167