1# Copyright (C) 2017 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# Functional test code for Dagger-Android 17 18load("//:test_defs.bzl", "GenRobolectricTests") 19 20package(default_visibility = ["//:src"]) 21 22android_library( 23 name = "functional", 24 srcs = glob( 25 ["*.java"], 26 exclude = ["*Test.java"], 27 ), 28 exports_manifest = 1, 29 manifest = "AndroidManifest.xml", 30 resource_files = glob(["res/**"]), 31 deps = [ 32 "@maven//:androidx_activity_activity", 33 "@maven//:androidx_fragment_fragment", 34 "@maven//:androidx_lifecycle_lifecycle_common", 35 "@maven//:androidx_lifecycle_lifecycle_viewmodel", 36 "@maven//:androidx_lifecycle_lifecycle_viewmodel_savedstate", 37 "@maven//:androidx_appcompat_appcompat", 38 "@maven//:androidx_annotation_annotation", 39 "//:dagger_with_compiler", 40 "//:android", 41 "//:android-support", 42 # TODO(ronshapiro): figure out why strict deps is failing without this 43 "//third_party/java/jsr250_annotations", 44 ], 45) 46 47GenRobolectricTests( 48 name = "functional_tests", 49 srcs = glob(["*Test.java"]), 50 manifest_values = { 51 "minSdkVersion": "14", 52 }, 53 deps = [ 54 ":functional", 55 "//:android", 56 "//:android-support", 57 "//:dagger_with_compiler", 58 "//third_party/java/truth", 59 "@maven//:androidx_activity_activity", 60 "@maven//:androidx_fragment_fragment", 61 "@maven//:androidx_lifecycle_lifecycle_common", 62 "@maven//:androidx_lifecycle_lifecycle_viewmodel", 63 "@maven//:androidx_lifecycle_lifecycle_viewmodel_savedstate", 64 "@maven//:androidx_test_core", 65 "@maven//:androidx_test_ext_junit", 66 "@maven//:junit_junit", 67 "@maven//:org_robolectric_robolectric", 68 ], 69) 70