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#   Hilt android processors.
17
18load("//:build_defs.bzl", "POM_VERSION_ALPHA")
19load("//tools:maven.bzl", "gen_maven_artifact")
20
21package(default_visibility = ["//:src"])
22
23java_library(
24    name = "artifact-lib",
25    tags = ["maven_coordinates=com.google.dagger:hilt-android-compiler:" + POM_VERSION_ALPHA],
26    visibility = ["//visibility:private"],
27    exports = [
28        "//java/dagger/hilt/processor:artifact-lib-shared",
29    ],
30)
31
32gen_maven_artifact(
33    name = "artifact",
34    artifact_coordinates = "com.google.dagger:hilt-android-compiler:" + POM_VERSION_ALPHA,
35    artifact_name = "Hilt Android Processor",
36    artifact_target = ":artifact-lib",
37    artifact_target_libs = [
38        "//java/dagger/hilt/android/processor/internal:android_classnames",
39        "//java/dagger/hilt/android/processor/internal:utils",
40        "//java/dagger/hilt/android/processor/internal/androidentrypoint:android_generators",
41        "//java/dagger/hilt/android/processor/internal/androidentrypoint:compiler_options",
42        "//java/dagger/hilt/android/processor/internal/androidentrypoint:metadata",
43        "//java/dagger/hilt/android/processor/internal/androidentrypoint:processor_lib",
44        "//java/dagger/hilt/android/processor/internal/bindvalue:bind_value_processor_lib",
45        "//java/dagger/hilt/android/processor/internal/customtestapplication:processor_lib",
46        "//java/dagger/hilt/android/processor/internal/viewmodel:validation_plugin_lib",
47        "//java/dagger/hilt/android/processor/internal/uninstallmodules:processor_lib",
48        "//java/dagger/hilt/android/processor/internal/viewmodel:processor_lib",
49        "//java/dagger/hilt/processor/internal:base_processor",
50        "//java/dagger/hilt/processor/internal:classnames",
51        "//java/dagger/hilt/processor/internal:component_descriptor",
52        "//java/dagger/hilt/processor/internal:component_names",
53        "//java/dagger/hilt/processor/internal:components",
54        "//java/dagger/hilt/processor/internal:kotlin",
55        "//java/dagger/hilt/processor/internal:processor_errors",
56        "//java/dagger/hilt/processor/internal:processors",
57        "//java/dagger/hilt/processor/internal/aggregateddeps:component_dependencies",
58        "//java/dagger/hilt/processor/internal/aggregateddeps:processor_lib",
59        "//java/dagger/hilt/processor/internal/aliasof:alias_ofs",
60        "//java/dagger/hilt/processor/internal/aliasof:processor_lib",
61        "//java/dagger/hilt/processor/internal/definecomponent:define_components",
62        "//java/dagger/hilt/processor/internal/definecomponent:processor_lib",
63        "//java/dagger/hilt/processor/internal/generatesrootinput:generates_root_inputs",
64        "//java/dagger/hilt/processor/internal/generatesrootinput:processor_lib",
65        "//java/dagger/hilt/processor/internal/originatingelement:processor_lib",
66        "//java/dagger/hilt/processor/internal/root:processor_lib",
67        "//java/dagger/hilt/processor/internal/root:root_metadata",
68        "//java/dagger/hilt/processor/internal/root:root_type",
69    ],
70    artifact_target_maven_deps = [
71        "com.google.auto:auto-common",
72        "com.google.code.findbugs:jsr305",
73        "com.google.dagger:dagger-compiler",
74        "com.google.dagger:dagger",
75        "com.google.dagger:dagger-spi",
76        "com.google.guava:failureaccess",
77        "com.google.guava:guava",
78        "com.squareup:javapoet",
79        "javax.annotation:jsr250-api",
80        "javax.inject:javax.inject",
81        "net.ltgt.gradle.incap:incap",
82        "org.jetbrains.kotlin:kotlin-stdlib",
83        "org.jetbrains.kotlinx:kotlinx-metadata-jvm",
84    ],
85    javadoc_android_api_level = 30,
86    javadoc_root_packages = [
87        "dagger.hilt.processor",
88        "dagger.hilt.android.processor",
89    ],
90    javadoc_srcs = [
91        "//java/dagger/hilt:hilt_processing_filegroup",
92    ],
93    shaded_deps = ["@maven//:com_google_auto_auto_common"],
94    shaded_rules = ["rule com.google.auto.common.** dagger.hilt.android.shaded.auto.common.@1"],
95)
96
97filegroup(
98    name = "srcs_filegroup",
99    srcs = glob(["*"]),
100)
101