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 = "AndroidManifest.xml", 23 manifest_values = { 24 "minSdkVersion": "15", 25 "targetSdkVersion": "27", 26 }, 27 deps = [ 28 ":TestInstallInModules", 29 "//:android_local_test_exports", 30 "//:dagger_with_compiler", 31 "//java/dagger/hilt/android:android_entry_point", 32 "//java/dagger/hilt/android/testing:hilt_android_test", 33 "//third_party/java/truth", 34 "@maven//:androidx_activity_activity", 35 "@maven//:androidx_fragment_fragment", 36 "@maven//:androidx_lifecycle_lifecycle_common", 37 "@maven//:androidx_lifecycle_lifecycle_viewmodel", 38 "@maven//:androidx_lifecycle_lifecycle_viewmodel_savedstate", 39 "@maven//:androidx_test_core", 40 "@maven//:androidx_test_ext_junit", 41 "@maven//:junit_junit", 42 "@maven//:org_robolectric_robolectric", 43 ], 44) 45 46android_local_test( 47 name = "TestInstallInBarTest", 48 srcs = ["TestInstallInBarTest.java"], 49 manifest_values = { 50 "minSdkVersion": "15", 51 "targetSdkVersion": "27", 52 }, 53 deps = [ 54 ":TestInstallInModules", 55 "//:android_local_test_exports", 56 "//:dagger_with_compiler", 57 "//java/dagger/hilt/android/testing:hilt_android_test", 58 "//java/dagger/hilt/android/testing:uninstall_modules", 59 "//java/dagger/hilt/testing:test_install_in", 60 "//third_party/java/truth", 61 "@maven//:androidx_test_core", 62 "@maven//:androidx_test_ext_junit", 63 "@maven//:junit_junit", 64 "@maven//:org_robolectric_robolectric", 65 ], 66) 67 68android_local_test( 69 name = "TestInstallInAppTest", 70 srcs = ["TestInstallInAppTest.java"], 71 manifest_values = { 72 "minSdkVersion": "15", 73 "targetSdkVersion": "27", 74 }, 75 deps = [ 76 ":TestInstallInApp", 77 ":TestInstallInModules", 78 "//:android_local_test_exports", 79 "//third_party/java/truth", 80 "@maven//:androidx_test_core", 81 "@maven//:androidx_test_ext_junit", 82 "@maven//:junit_junit", 83 "@maven//:org_robolectric_robolectric", 84 ], 85) 86 87android_library( 88 name = "TestInstallInApp", 89 testonly = True, 90 srcs = ["TestInstallInApp.java"], 91 deps = [ 92 ":TestInstallInModules", 93 "//:android_local_test_exports", 94 "//:dagger_with_compiler", 95 "//java/dagger/hilt/android:hilt_android_app", 96 ], 97) 98 99android_library( 100 name = "TestInstallInModules", 101 testonly = True, 102 srcs = ["TestInstallInModules.java"], 103 deps = [ 104 "//:dagger_with_compiler", 105 "//java/dagger/hilt:install_in", 106 "//java/dagger/hilt/android/components", 107 "//java/dagger/hilt/testing:test_install_in", 108 "@maven//:androidx_activity_activity", 109 "@maven//:androidx_fragment_fragment", 110 "@maven//:androidx_lifecycle_lifecycle_common", 111 "@maven//:androidx_lifecycle_lifecycle_viewmodel", 112 "@maven//:androidx_lifecycle_lifecycle_viewmodel_savedstate", 113 ], 114) 115