xref: /aosp_15_r20/external/dagger2/javatests/dagger/functional/jdk8/BUILD (revision f585d8a307d0621d6060bd7e80091fdcbf94fe27)
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#   Functional tests for Dagger that depend on Guava
17
18load("//:build_defs.bzl", "DOCLINT_HTML_AND_SYNTAX")
19load("//:test_defs.bzl", "GenJavaTests")
20
21package(default_visibility = ["//:src"])
22
23java_library(
24    name = "optional_binding_components",
25    srcs = ["OptionalBindingComponents.java"],
26    javacopts = DOCLINT_HTML_AND_SYNTAX,
27    deps = [
28        "//:dagger_with_compiler",
29        "//third_party/java/auto:value",
30        "//third_party/java/jsr305_annotations",
31    ],
32)
33
34# TODO(b/203233586): Replace with GenJavaTest
35GenJavaTests(
36    name = "OptionalBindingComponentsEmptyTest",
37    srcs = ["OptionalBindingComponentsEmptyTest.java"],
38    javacopts = DOCLINT_HTML_AND_SYNTAX,
39    require_jdk7_syntax = False,
40    test_only_deps = [
41        ":optional_binding_components",
42        "//third_party/java/guava/base",
43        "//third_party/java/guava/collect",
44        "//third_party/java/junit",
45        "//third_party/java/truth",
46    ],
47    deps = [
48        "//:dagger_with_compiler",
49        "//third_party/java/auto:value",
50        "//third_party/java/jsr305_annotations",
51    ],
52)
53
54# TODO(b/203233586): Replace with GenJavaTest
55GenJavaTests(
56    name = "OptionalBindingComponentsPresentTest",
57    srcs = ["OptionalBindingComponentsPresentTest.java"],
58    javacopts = DOCLINT_HTML_AND_SYNTAX,
59    require_jdk7_syntax = False,
60    test_only_deps = [
61        ":optional_binding_components",
62        "//third_party/java/guava/base",
63        "//third_party/java/guava/collect",
64        "//third_party/java/junit",
65        "//third_party/java/truth",
66    ],
67    deps = [
68        "//:dagger_with_compiler",
69        "//third_party/java/auto:value",
70        "//third_party/java/jsr305_annotations",
71    ],
72)
73