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 15# Description: 16# Internal Hilt android testing libraries 17 18package(default_visibility = ["//:src"]) 19 20java_library( 21 name = "test_injector", 22 testonly = 1, 23 srcs = [ 24 "TestInjector.java", 25 ], 26) 27 28android_library( 29 name = "internal_test_root", 30 srcs = [ 31 "InternalTestRoot.java", 32 ], 33 deps = [ 34 "//java/dagger/hilt:generates_root_input", 35 ], 36) 37 38android_library( 39 name = "early_test_singleton_component_creator", 40 testonly = 1, 41 srcs = ["EarlySingletonComponentCreator.java"], 42) 43 44android_library( 45 name = "test_application_component_manager", 46 testonly = 1, 47 srcs = ["TestApplicationComponentManager.java"], 48 deps = [ 49 ":early_test_singleton_component_creator", 50 ":test_component_data", 51 ":test_injector", 52 "//java/dagger/hilt/android/testing:on_component_ready_runner", 53 "//java/dagger/hilt/internal:component_manager", 54 "//java/dagger/hilt/internal:preconditions", 55 "//java/dagger/hilt/internal:test_singleton_component_manager", 56 "@maven//:junit_junit", 57 ], 58) 59 60android_library( 61 name = "test_component_data", 62 testonly = 1, 63 srcs = [ 64 "TestComponentData.java", 65 "TestComponentDataSupplier.java", 66 ], 67 deps = [ 68 ":test_injector", 69 "//java/dagger/hilt/internal:component_manager", 70 ], 71) 72 73android_library( 74 name = "test_application_component_manager_holder", 75 testonly = 1, 76 srcs = ["TestApplicationComponentManagerHolder.java"], 77 deps = [ 78 "//java/dagger/hilt/internal:component_manager", 79 ], 80) 81 82android_library( 83 name = "mark_that_rules_ran_rule", 84 testonly = 1, 85 srcs = ["MarkThatRulesRanRule.java"], 86 deps = [ 87 ":test_application_component_manager", 88 ":test_application_component_manager_holder", 89 "//java/dagger/hilt/android/internal", 90 "//java/dagger/hilt/internal:component_manager", 91 "//java/dagger/hilt/internal:preconditions", 92 "@maven//:androidx_test_core", 93 "@maven//:junit_junit", 94 ], 95) 96 97filegroup( 98 name = "srcs_filegroup", 99 srcs = glob(["**/*"]), 100) 101