1// 2// Copyright (C) 2021 The Android Open Source Project 3// 4// Licensed under the Apache License, Version 2.0 (the "License"); 5// you may not use this file except in compliance with the License. 6// You may obtain a copy of the License at 7// 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// See the License for the specific language governing permissions and 14// limitations under the License. 15// 16 17package { 18 default_applicable_licenses: ["Android-Apache-2.0"], 19} 20 21cc_defaults { 22 name: "split_native_defaults", 23 gtest: false, 24 cflags: [ 25 "-Wall", 26 "-Werror", 27 "-Wno-unused-parameter", 28 ], 29 target: { 30 android_arm: { 31 cflags: [ 32 "-D__ANDROID_ARCH__=\"armeabi-v7a\"", 33 ], 34 }, 35 android_arm64: { 36 cflags: [ 37 "-D__ANDROID_ARCH__=\"arm64-v8a\"", 38 ], 39 }, 40 android_x86: { 41 cflags: [ 42 "-D__ANDROID_ARCH__=\"x86\"", 43 ], 44 }, 45 android_x86_64: { 46 cflags: [ 47 "-D__ANDROID_ARCH__=\"x86_64\"", 48 ], 49 }, 50 android_riscv64: { 51 cflags: [ 52 "-D__ANDROID_ARCH__=\"riscv64\"", 53 ], 54 }, 55 }, 56 sdk_version: "current", 57} 58 59cc_defaults { 60 name: "split_number_provider_defaults", 61 defaults: ["split_native_defaults"], 62 srcs: ["number_providers.cpp"], 63} 64 65cc_test_library { 66 name: "libsplitapp_number_provider_a", 67 defaults: ["split_number_provider_defaults"], 68 cflags: [ 69 "-DANDROID_SPLIT_APP_NUMBER_PROVIDER_A_SO=1", 70 ], 71} 72 73cc_test_library { 74 name: "libsplitapp_number_provider_b", 75 defaults: ["split_number_provider_defaults"], 76 cflags: [ 77 "-DANDROID_SPLIT_APP_NUMBER_PROVIDER_B_SO=1", 78 ], 79} 80 81cc_test_library { 82 name: "libsplitapp_number_proxy", 83 defaults: ["split_number_provider_defaults"], 84 cflags: [ 85 "-DANDROID_SPLIT_APP_NUMBER_PROXY_SO=1", 86 ], 87} 88 89 90TARGET_TEST_SUITES = [ 91 "cts", 92 "general-tests", 93] 94 95/** 96 * Non-isolated split feature 97 */ 98java_defaults { 99 name: "CtsSplitTestHelperApp_defaults", 100 certificate: ":cts-testkey1", 101 aaptflags: [ 102 "--replace-version", 103 "--version-code 100", 104 ], 105 test_suites: TARGET_TEST_SUITES, 106} 107 108java_defaults { 109 name: "CtsSplitTestHelperApp_number_provider_defaults", 110 defaults: ["CtsSplitTestHelperApp_defaults"], 111 compile_multilib: "both", 112 test_suites: TARGET_TEST_SUITES, 113} 114 115android_test_helper_app { 116 name: "CtsSplitApp_number_provider_a", 117 defaults: ["CtsSplitTestHelperApp_number_provider_defaults"], 118 manifest: "AndroidManifest_number_provider_a.xml", 119 jni_libs: ["libsplitapp_number_provider_a"], 120 test_suites: TARGET_TEST_SUITES, 121} 122 123android_test_helper_app { 124 name: "CtsSplitApp_number_provider_b", 125 defaults: ["CtsSplitTestHelperApp_number_provider_defaults"], 126 manifest: "AndroidManifest_number_provider_b.xml", 127 jni_libs: ["libsplitapp_number_provider_b"], 128 test_suites: TARGET_TEST_SUITES, 129} 130 131android_test_helper_app { 132 name: "CtsSplitApp_number_proxy", 133 defaults: ["CtsSplitTestHelperApp_number_provider_defaults"], 134 manifest: "AndroidManifest_number_proxy.xml", 135 jni_libs: ["libsplitapp_number_proxy"], 136 test_suites: TARGET_TEST_SUITES, 137} 138