1package { 2 // See: http://go/android-license-faq 3 // A large-scale-change added 'default_applicable_licenses' to import 4 // all of the 'license_kinds' from "frameworks_base_license" 5 // to get the below license kinds: 6 // SPDX-license-identifier-Apache-2.0 7 default_applicable_licenses: ["frameworks_base_license"], 8} 9 10android_ravenwood_test { 11 name: "RavenwoodBivalentInstTest_self_inst", 12 13 srcs: [ 14 "test/**/*.java", 15 ], 16 exclude_srcs: [ 17 "test/**/*_nonself.java", 18 ], 19 20 static_libs: [ 21 "RavenwoodBivalentInstTest_self_inst_device_R", 22 23 "androidx.annotation_annotation", 24 "androidx.test.ext.junit", 25 "androidx.test.rules", 26 27 "junit", 28 "truth", 29 ], 30 31 package_name: "com.android.ravenwood.bivalentinsttest_self_inst", 32 33 resource_apk: "RavenwoodBivalentInstTest_self_inst_device", 34 auto_gen_config: true, 35} 36 37android_ravenwood_test { 38 name: "RavenwoodBivalentInstTest_nonself_inst", 39 40 srcs: [ 41 "test/**/*.java", 42 ], 43 exclude_srcs: [ 44 "test/**/*_self.java", 45 ], 46 47 static_libs: [ 48 "RavenwoodBivalentInstTestTarget_R", 49 "RavenwoodBivalentInstTest_nonself_inst_device_R", 50 51 "androidx.annotation_annotation", 52 "androidx.test.ext.junit", 53 "androidx.test.rules", 54 55 "junit", 56 "truth", 57 ], 58 resource_apk: "RavenwoodBivalentInstTestTarget", 59 60 package_name: "com.android.ravenwood.bivalentinst_target_app", 61 inst_package_name: "com.android.ravenwood.bivalentinsttest_nonself_inst", 62 63 inst_resource_apk: "RavenwoodBivalentInstTest_nonself_inst_device", 64 auto_gen_config: true, 65} 66 67// We have 3 R.javas from the 3 packages (2 test apks below, and 1 target APK) 68// RavenwoodBivalentInstTest needs to use all of them, but we can't add all the 69// {.aapt.srcjar}'s together because that'd cause 70// "duplicate declaration of androidx.test.core.R$string." 71// So we build them as separate libraries, and include them as static_libs. 72java_library { 73 name: "RavenwoodBivalentInstTestTarget_R", 74 srcs: [ 75 ":RavenwoodBivalentInstTestTarget{.aapt.srcjar}", 76 ], 77} 78 79java_library { 80 name: "RavenwoodBivalentInstTest_self_inst_device_R", 81 srcs: [ 82 ":RavenwoodBivalentInstTest_self_inst_device{.aapt.srcjar}", 83 ], 84} 85 86java_library { 87 name: "RavenwoodBivalentInstTest_nonself_inst_device_R", 88 srcs: [ 89 ":RavenwoodBivalentInstTest_nonself_inst_device{.aapt.srcjar}", 90 ], 91} 92 93android_test { 94 name: "RavenwoodBivalentInstTest_self_inst_device", 95 96 srcs: [ 97 "test/**/*.java", 98 ], 99 exclude_srcs: [ 100 "test/**/*_nonself.java", 101 ], 102 static_libs: [ 103 "junit", 104 "truth", 105 106 "androidx.annotation_annotation", 107 "androidx.test.ext.junit", 108 "androidx.test.rules", 109 110 "ravenwood-junit", 111 ], 112 test_suites: [ 113 "device-tests", 114 ], 115 use_resource_processor: false, 116 manifest: "AndroidManifest-self-inst.xml", 117 test_config: "AndroidTest-self-inst.xml", 118 optimize: { 119 enabled: false, 120 }, 121} 122 123android_test { 124 name: "RavenwoodBivalentInstTest_nonself_inst_device", 125 126 srcs: [ 127 "test/**/*.java", 128 ], 129 exclude_srcs: [ 130 "test/**/*_self.java", 131 ], 132 static_libs: [ 133 "junit", 134 "truth", 135 136 "androidx.annotation_annotation", 137 "androidx.test.ext.junit", 138 "androidx.test.rules", 139 140 "ravenwood-junit", 141 ], 142 data: [ 143 ":RavenwoodBivalentInstTestTarget", 144 ], 145 test_suites: [ 146 "device-tests", 147 ], 148 use_resource_processor: false, 149 manifest: "AndroidManifest-nonself-inst.xml", 150 test_config: "AndroidTest-nonself-inst.xml", 151 instrumentation_for: "RavenwoodBivalentInstTestTarget", 152 optimize: { 153 enabled: false, 154 }, 155} 156