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 "TestApplicationInjector.java", 25 "TestInjector.java", 26 ], 27) 28 29android_library( 30 name = "internal_test_root", 31 srcs = [ 32 "InternalTestRoot.java", 33 ], 34 deps = [ 35 "//java/dagger/hilt:generates_root_input", 36 ], 37) 38 39android_library( 40 name = "test_application_component_manager", 41 testonly = 1, 42 srcs = ["TestApplicationComponentManager.java"], 43 deps = [ 44 ":test_component_data", 45 ":test_injector", 46 "//java/dagger/hilt/android/testing:on_component_ready_runner", 47 "//java/dagger/hilt/internal:component_manager", 48 "//java/dagger/hilt/internal:preconditions", 49 "@maven//:junit_junit", 50 ], 51) 52 53android_library( 54 name = "test_component_data", 55 testonly = 1, 56 srcs = [ 57 "TestComponentData.java", 58 "TestComponentDataSupplier.java", 59 ], 60 deps = [ 61 ":test_injector", 62 "//java/dagger/hilt/internal:component_manager", 63 ], 64) 65 66android_library( 67 name = "test_application_component_manager_holder", 68 testonly = 1, 69 srcs = ["TestApplicationComponentManagerHolder.java"], 70) 71 72android_library( 73 name = "mark_that_rules_ran_rule", 74 testonly = 1, 75 srcs = ["MarkThatRulesRanRule.java"], 76 deps = [ 77 ":test_application_component_manager", 78 ":test_application_component_manager_holder", 79 "//java/dagger/hilt/internal:component_manager", 80 "//java/dagger/hilt/internal:preconditions", 81 "@maven//:androidx_test_core", 82 "@maven//:junit_junit", 83 ], 84) 85 86filegroup( 87 name = "srcs_filegroup", 88 srcs = glob(["**/*"]), 89) 90