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 17load("//java/dagger/testing/compile:macros.bzl", "compiler_test", "kt_compiler_test") 18 19package(default_visibility = ["//:src"]) 20 21compiler_test( 22 name = "ActivityGeneratorTest", 23 srcs = ["ActivityGeneratorTest.java"], 24 compiler_deps = [ 25 "//java/dagger/hilt/android:android_entry_point", 26 "@androidsdk//:platforms/android-34/android.jar", 27 ], 28 resources = glob([ 29 "goldens/ActivityGeneratorTest_*", 30 ]), 31 deps = [ 32 "//java/dagger/hilt/android/testing/compile", 33 "//java/dagger/internal/codegen/xprocessing:xprocessing-testing", 34 "//java/dagger/testing/golden", 35 "//third_party/java/junit", 36 ], 37) 38 39compiler_test( 40 name = "AndroidEntryPointProcessorTest", 41 srcs = ["AndroidEntryPointProcessorTest.java"], 42 compiler_deps = [ 43 "//java/dagger/hilt/android:hilt_android_app", 44 "//java/dagger/hilt/android:android_entry_point", 45 "@androidsdk//:platforms/android-34/android.jar", 46 ], 47 deps = [ 48 "//java/dagger/hilt/android/testing/compile", 49 "//java/dagger/internal/codegen/xprocessing", 50 "//java/dagger/internal/codegen/xprocessing:xprocessing-testing", 51 "//third_party/java/guava/collect", 52 "//third_party/java/junit", 53 ], 54) 55 56kt_compiler_test( 57 name = "KotlinAndroidEntryPointProcessorTest", 58 srcs = ["KotlinAndroidEntryPointProcessorTest.java"], 59 compiler_deps = [ 60 "//java/dagger/hilt/android:hilt_android_app", 61 "//java/dagger/hilt/android:android_entry_point", 62 "@androidsdk//:platforms/android-34/android.jar", 63 ], 64 deps = [ 65 "//java/dagger/hilt/android/testing/compile", 66 "//java/dagger/internal/codegen/xprocessing:xprocessing-testing", 67 "//third_party/java/guava/collect", 68 "//third_party/java/junit", 69 "//third_party/java/truth", 70 ], 71) 72