• 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#   Functional test code for Dagger-Android
17
18load("//:test_defs.bzl", "GenRobolectricTests")
19
20package(default_visibility = ["//:src"])
21
22android_library(
23    name = "functional",
24    srcs = glob(
25        ["*.java"],
26        exclude = ["*Test.java"],
27    ),
28    exports_manifest = 1,
29    manifest = "AndroidManifest.xml",
30    resource_files = glob(["res/**"]),
31    deps = [
32        "@maven//:androidx_fragment_fragment",
33        "@maven//:androidx_appcompat_appcompat",
34        "@maven//:androidx_annotation_annotation",
35        "//java/dagger/internal/guava:collect-android",
36        "//:dagger_with_compiler",
37        "//:android",
38        "//:android-support",
39        # TODO(ronshapiro): figure out why strict deps is failing without this
40        "@google_bazel_common//third_party/java/jsr250_annotations",
41    ],
42)
43
44GenRobolectricTests(
45    name = "functional_tests",
46    srcs = glob(["*Test.java"]),
47    deps = [
48        ":functional",
49        "//:android",
50        "//:android-support",
51        "//:dagger_with_compiler",
52        "@google_bazel_common//third_party/java/truth",
53        "@maven//:androidx_fragment_fragment",
54        "@maven//:junit_junit",
55        "@maven//:org_robolectric_robolectric",
56    ],
57)
58