1// Copyright (C) 2019 The Android Open Source Project 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 15apex_test { 16 name: "test_com.android.sdkext", 17 visibility: [ "//system/apex/tests/sdkextensions" ], 18 defaults: ["com.android.sdkext-defaults"], 19 java_libs: [ "test_framework-sdkextensions" ], 20 manifest: "test_manifest.json", 21 prebuilts: [ "sdkinfo_45" ], 22 file_contexts: ":com.android.sdkext-file_contexts", 23 installable: false, // Should never be installed on the systemimage 24 multilib: { 25 prefer32: { 26 binaries: ["derive_sdk_prefer32"], 27 }, 28 }, 29 // The automated test infra ends up building this apex for 64+32-bit and 30 // then installs it on a 32-bit-only device. Work around this weirdness 31 // by preferring 32-bit. 32 compile_multilib: "prefer32", 33} 34 35genrule { 36 name: "sdkinfo_45_src", 37 out: [ "sdkinfo.binarypb" ], 38 tools: [ "gen_sdkinfo" ], 39 cmd: "$(location) -v 45 -o $(out)", 40} 41 42prebuilt_etc { 43 name: "sdkinfo_45", 44 src: ":sdkinfo_45_src", 45 filename: "sdkinfo.binarypb", 46 installable: false, 47 visibility: [ 48 ":__pkg__", 49 "//frameworks/av/apex/testing" 50 ], 51} 52 53filegroup { 54 name: "test_framework-sdkextensions-sources", 55 srcs: ["impl-src/**/*.java"], 56 path: "impl-src", 57} 58 59 60dex_import { 61 name: "test_framework-sdkextensions", 62 jars: ["test_framework-sdkextensions.jar"], 63 stem: "framework-sdkextensions", 64 apex_available: ["test_com.android.sdkext"], 65} 66 67// It isn't currently possible to build this from source because of limitations 68// in the build + hiddenapi generation. 69//java_library { 70// name: "test_framework-sdkextensions", 71// srcs: ["impl-src/**/*.java"], 72// static_libs: ["framework-sdkextensions.impl"], 73// libs: ["framework-annotations-lib"], 74// stem: "framework-sdkextensions", 75// sdk_version: "module_current", 76// installable: true, 77// hostdex: true, // for hiddenapi check 78//} 79 80java_library { 81 name: "test_framework-sdkextensions-stubs", 82 srcs: ["stub-src/**/*.java"], 83 sdk_version: "current", 84 visibility: [ "//system/apex/tests/sdkextensions" ], 85} 86