1// Copyright (C) 2020 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 15package { 16 default_team: "trendy_team_framework_android_packages", 17 default_applicable_licenses: ["Android-Apache-2.0"], 18} 19 20android_test_helper_app { 21 name: "CtsApkVerityTestApp", 22 manifest: "AndroidManifest.xml", 23 srcs: ["src/**/*.java"], 24 jni_libs: [ 25 "libCtsApkVerityTestAppJni", 26 ], 27 compile_multilib: "both", 28 libs: [ 29 "junit", 30 ], 31 static_libs: [ 32 "androidx.test.runner", 33 "ctstestrunner-axt", 34 ], 35 dex_preopt: { 36 enabled: false, 37 }, 38 use_embedded_native_libs: true, 39 sdk_version: "current", 40 certificate: ":cts-testkey1", 41 dist: { 42 targets: [ 43 "cts", 44 ], 45 }, 46 v4_signature: true, 47} 48 49android_test_helper_app { 50 name: "CtsApkVerityTestAppSplit", 51 manifest: "feature_split/AndroidManifest.xml", 52 srcs: ["feature_split/src/**/*.java"], 53 aaptflags: [ 54 "--custom-package android.appsecurity.cts.apkveritytestapp.feature_x", 55 "--package-id 0x80", 56 ], 57 dex_preopt: { 58 enabled: false, 59 }, 60 sdk_version: "current", 61 certificate: ":cts-testkey1", 62 dist: { 63 targets: [ 64 "cts", 65 ], 66 }, 67} 68 69genrule { 70 name: "CtsApkVerityTestAppApkIdSig", 71 srcs: [":CtsApkVerityTestApp"], 72 cmd: "for file in $(in); do " + 73 " if [[ $$file == *.apk.idsig ]]; then " + 74 " cp $$file $(out); " + 75 " fi " + 76 " done", 77 out: ["CtsApkVerityTestApp.apk.idsig"], 78 dist: { 79 targets: [ 80 "cts", 81 ], 82 }, 83} 84 85cc_library_shared { 86 name: "libCtsApkVerityTestAppJni", 87 srcs: ["jni/**/*.cpp"], 88 shared_libs: [ 89 "libnativehelper_compat_libc++", 90 "liblog", 91 ], 92 static_libs: [ 93 "libbase_ndk", 94 ], 95 cflags: [ 96 "-Wall", 97 "-Werror", 98 ], 99 stl: "c++_static", 100 sdk_version: "current", 101} 102