xref: /aosp_15_r20/external/dagger2/java/dagger/internal/codegen/base/BUILD (revision f585d8a307d0621d6060bd7e80091fdcbf94fe27)
1# Copyright (C) 2019 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#   Sources related to compiler options.
17
18load("@rules_java//java:defs.bzl", "java_library")
19
20package(default_visibility = ["//:src"])
21
22SHARED_SOURCES = [
23    "ClearableCache.java",
24]
25
26java_library(
27    name = "base",
28    srcs = glob(
29        ["*.java"],
30        exclude = SHARED_SOURCES,
31    ),
32    plugins = ["//java/dagger/internal/codegen/bootstrap"],
33    tags = ["maven:merged"],
34    exports = [":shared"],
35    deps = [
36        "//java/dagger:core",
37        "//java/dagger/internal/codegen/compileroption",
38        "//java/dagger/internal/codegen/extension",
39        "//java/dagger/internal/codegen/javapoet",
40        "//java/dagger/internal/codegen/langmodel",
41        "//java/dagger/internal/codegen/model",
42        "//java/dagger/internal/codegen/xprocessing",
43        "//third_party/java/auto:value",
44        "//third_party/java/guava/base",
45        "//third_party/java/guava/collect",
46        "//third_party/java/guava/graph",
47        "//third_party/java/javapoet",
48        "//third_party/java/jsr330_inject",
49        "@maven//:com_google_devtools_ksp_symbol_processing_api",
50    ],
51)
52
53# TODO(bcorso): Remove this target but first remove spi and producers from :base
54java_library(
55    name = "shared",
56    srcs = SHARED_SOURCES,
57    tags = ["maven:merged"],
58)
59