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 }, 51 sdk_version: "current", 52} 53 54cc_defaults { 55 name: "split_number_provider_defaults", 56 defaults: ["split_native_defaults"], 57 srcs: ["number_providers.cpp"], 58} 59 60cc_test_library { 61 name: "libsplitapp_number_provider_a", 62 defaults: ["split_number_provider_defaults"], 63 cflags: [ 64 "-DANDROID_SPLIT_APP_NUMBER_PROVIDER_A_SO=1", 65 ], 66} 67 68cc_test_library { 69 name: "libsplitapp_number_provider_b", 70 defaults: ["split_number_provider_defaults"], 71 cflags: [ 72 "-DANDROID_SPLIT_APP_NUMBER_PROVIDER_B_SO=1", 73 ], 74} 75 76cc_test_library { 77 name: "libsplitapp_number_proxy", 78 defaults: ["split_number_provider_defaults"], 79 cflags: [ 80 "-DANDROID_SPLIT_APP_NUMBER_PROXY_SO=1", 81 ], 82} 83 84 85TARGET_TEST_SUITES = [ 86 "cts", 87 "general-tests", 88] 89 90/** 91 * Non-isolated split feature 92 */ 93java_defaults { 94 name: "CtsSplitTestHelperApp_defaults", 95 certificate: ":cts-testkey1", 96 aaptflags: [ 97 "--replace-version", 98 "--version-code 100", 99 ], 100 test_suites: TARGET_TEST_SUITES, 101} 102 103java_defaults { 104 name: "CtsSplitTestHelperApp_number_provider_defaults", 105 defaults: ["CtsSplitTestHelperApp_defaults"], 106 compile_multilib: "both", 107 test_suites: TARGET_TEST_SUITES, 108} 109 110android_test_helper_app { 111 name: "CtsSplitApp_number_provider_a", 112 defaults: ["CtsSplitTestHelperApp_number_provider_defaults"], 113 manifest: "AndroidManifest_number_provider_a.xml", 114 jni_libs: ["libsplitapp_number_provider_a"], 115 test_suites: TARGET_TEST_SUITES, 116} 117 118android_test_helper_app { 119 name: "CtsSplitApp_number_provider_b", 120 defaults: ["CtsSplitTestHelperApp_number_provider_defaults"], 121 manifest: "AndroidManifest_number_provider_b.xml", 122 jni_libs: ["libsplitapp_number_provider_b"], 123 test_suites: TARGET_TEST_SUITES, 124} 125 126android_test_helper_app { 127 name: "CtsSplitApp_number_proxy", 128 defaults: ["CtsSplitTestHelperApp_number_provider_defaults"], 129 manifest: "AndroidManifest_number_proxy.xml", 130 jni_libs: ["libsplitapp_number_proxy"], 131 test_suites: TARGET_TEST_SUITES, 132} 133