• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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# Description:
15#   Tests for internal code for implementing Hilt processors.
16
17package(default_visibility = ["//:src"])
18
19android_local_test(
20    name = "TestInstallInFooTest",
21    srcs = ["TestInstallInFooTest.java"],
22    manifest_values = {
23        "minSdkVersion": "15",
24        "targetSdkVersion": "27",
25    },
26    deps = [
27        ":TestInstallInModules",
28        "//:android_local_test_exports",
29        "//:dagger_with_compiler",
30        "@maven//:junit_junit",
31
32                        "@maven//:org_robolectric_robolectric",
33                        "@maven//:androidx_test_ext_junit",
34                        "@maven//:androidx_test_core",
35
36        "@google_bazel_common//third_party/java/truth",
37        "//java/dagger/hilt/android/testing:hilt_android_test",
38    ],
39)
40
41android_local_test(
42    name = "TestInstallInBarTest",
43    srcs = ["TestInstallInBarTest.java"],
44    manifest_values = {
45        "minSdkVersion": "15",
46        "targetSdkVersion": "27",
47    },
48    deps = [
49        ":TestInstallInModules",
50        "//:android_local_test_exports",
51        "//:dagger_with_compiler",
52        "@maven//:junit_junit",
53
54                        "@maven//:org_robolectric_robolectric",
55                        "@maven//:androidx_test_ext_junit",
56                        "@maven//:androidx_test_core",
57
58        "@google_bazel_common//third_party/java/truth",
59        "//java/dagger/hilt/android/testing:hilt_android_test",
60        "//java/dagger/hilt/android/testing:uninstall_modules",
61        "//java/dagger/hilt/testing:test_install_in",
62    ],
63)
64
65android_local_test(
66    name = "TestInstallInAppTest",
67    srcs = ["TestInstallInAppTest.java"],
68    manifest_values = {
69        "minSdkVersion": "15",
70        "targetSdkVersion": "27",
71    },
72    deps = [
73        ":TestInstallInApp",
74        ":TestInstallInModules",
75        "//:android_local_test_exports",
76        "@maven//:junit_junit",
77
78                        "@maven//:org_robolectric_robolectric",
79                        "@maven//:androidx_test_ext_junit",
80                        "@maven//:androidx_test_core",
81
82        "@google_bazel_common//third_party/java/truth",
83    ],
84)
85
86android_library(
87    name = "TestInstallInApp",
88    testonly = True,
89    srcs = ["TestInstallInApp.java"],
90    deps = [
91        ":TestInstallInModules",
92        "//:dagger_with_compiler",
93        "//java/dagger/hilt/android:hilt_android_app",
94    ],
95)
96
97android_library(
98    name = "TestInstallInModules",
99    testonly = True,
100    srcs = ["TestInstallInModules.java"],
101    deps = [
102        "//:dagger_with_compiler",
103        "//java/dagger/hilt:install_in",
104        "//java/dagger/hilt/android/components",
105        "//java/dagger/hilt/testing:test_install_in",
106    ],
107)
108