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_applicable_licenses: ["Android-Apache-2.0"],
17}
18
19android_test_helper_app {
20    name: "CtsApkVerityTestApp",
21    manifest: "AndroidManifest.xml",
22    srcs: ["src/**/*.java"],
23    jni_libs: [
24        "libCtsApkVerityTestAppJni",
25    ],
26    compile_multilib: "both",
27    libs: [
28        "junit",
29    ],
30    static_libs: [
31        "androidx.test.runner",
32        "ctstestrunner-axt",
33    ],
34    dex_preopt: {
35        enabled: false,
36    },
37    use_embedded_native_libs: true,
38    sdk_version: "current",
39    certificate: ":cts-testkey1",
40    dist: {
41        targets: [
42            "cts",
43        ],
44    },
45    v4_signature: true,
46}
47
48android_test_helper_app {
49    name: "CtsApkVerityTestAppSplit",
50    manifest: "feature_split/AndroidManifest.xml",
51    srcs: ["feature_split/src/**/*.java"],
52    aaptflags: [
53        "--custom-package android.appsecurity.cts.apkveritytestapp.feature_x",
54        "--package-id 0x80",
55    ],
56    dex_preopt: {
57        enabled: false,
58    },
59    sdk_version: "current",
60    certificate: ":cts-testkey1",
61    dist: {
62        targets: [
63            "cts",
64        ],
65    },
66}
67
68cc_library_shared {
69    name: "libCtsApkVerityTestAppJni",
70    srcs: ["jni/**/*.cpp"],
71    shared_libs: [
72        "libnativehelper_compat_libc++",
73        "liblog",
74    ],
75    static_libs: [
76        "libbase_ndk",
77    ],
78    cflags: [
79        "-Wall",
80        "-Werror",
81    ],
82    stl: "c++_static",
83    sdk_version: "current",
84}
85