• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2017 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#   A JSR-330 compliant dependency injection system for android and java
17
18load("@rules_java//java:defs.bzl", "java_library")
19load(
20    "//:build_defs.bzl",
21    "DOCLINT_HTML_AND_SYNTAX",
22    "JAVA_RELEASE_MIN",
23    "POM_VERSION",
24)
25load("//tools/maven:maven.bzl", "gen_maven_artifact")
26
27package(default_visibility = ["//:src"])
28
29java_library(
30    name = "core",
31    srcs = glob(["**/*.java"]),
32    javacopts = JAVA_RELEASE_MIN + DOCLINT_HTML_AND_SYNTAX,
33    tags = ["maven_coordinates=com.google.dagger:dagger:" + POM_VERSION],
34    exports = ["//third_party/java/jsr330_inject"],
35    deps = [
36        "//third_party/java/jspecify_annotations",
37        "//third_party/java/jsr330_inject",
38        "@maven//:jakarta_inject_jakarta_inject_api",
39    ],
40)
41
42gen_maven_artifact(
43    name = "artifact",
44    artifact_coordinates = "com.google.dagger:dagger:" + POM_VERSION,
45    artifact_name = "Dagger",
46    artifact_target = ":core",
47    artifact_target_maven_deps = [
48        "org.jspecify:jspecify",
49        "jakarta.inject:jakarta.inject-api",
50        "javax.inject:javax.inject",
51    ],
52    javadoc_root_packages = ["dagger"],
53    javadoc_srcs = [":javadoc-srcs"],
54    proguard_specs = [":proguard.pro"],
55    r8_specs = [":r8.pro"],
56)
57
58filegroup(
59    name = "javadoc-srcs",
60    srcs = glob(["**/*"]),
61)
62