xref: /aosp_15_r20/cts/hostsidetests/statsdatom/apps/statsdapp/Android.bp (revision b7c941bb3fa97aba169d73cee0bed2de8ac964bf)
1/*
2 * Copyright (C) 2020 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_library_shared {
22    name: "liblmkhelper_statsdatom", //TODO(b/163546661): rename back to liblmkhelper.
23    srcs: ["jni/alloc_stress_activity.cpp"],
24    cflags: [
25        "-Wall",
26        "-Werror",
27    ],
28    header_libs: ["jni_headers"],
29    shared_libs: ["liblog"],
30    stl: "c++_static",
31    sdk_version: "current",
32}
33
34cc_library_shared {
35    name: "libcrashhelper",
36    srcs: ["jni/crash_activity.cpp"],
37    cflags: [
38        "-Wall",
39        "-Werror",
40    ],
41    header_libs: ["jni_headers"],
42    stl: "c++_static",
43    sdk_version: "current",
44}
45
46cc_library_shared {
47    name: "libimagedecoderhelper",
48    srcs: ["jni/image_decoding.cpp"],
49    cflags: [
50        "-Wall",
51        "-Werror",
52    ],
53    shared_libs: [
54        "libandroid",
55        "libjnigraphics",
56        "liblog",
57    ],
58    header_libs: ["jni_headers"],
59    stl: "c++_static",
60    sdk_version: "current",
61}
62
63android_test_helper_app {
64    name: "CtsStatsdAtomApp",
65    defaults: ["cts_defaults"],
66    platform_apis: true,
67    min_sdk_version: "28",
68    srcs: [
69        "src/**/*.java",
70        ":statslog-statsdatom-cts-java-gen",
71    ],
72    libs: [
73        "androidx.annotation_annotation",
74        "android.test.runner.stubs.system",
75        "junit",
76        "org.apache.http.legacy.stubs.system",
77    ],
78    privileged: true,
79    static_libs: [
80        "bluetooth-test-util-lib",
81        "core-tests-support",
82        "ctstestrunner-axt",
83        "compatibility-device-util-axt",
84        "androidx.legacy_legacy-support-v4",
85        "androidx.test.rules",
86        "cts-net-utils",
87        "collector-device-lib",
88        "cts_adpf_atom_common",
89        "flag-junit",
90    ],
91    jni_libs: [
92        "liblmkhelper_statsdatom",
93        "libcrashhelper",
94        "libimagedecoderhelper",
95    ],
96    compile_multilib: "both",
97    v4_signature: true,
98}
99
100java_library_static {
101    name: "statslog-cts",
102    srcs: [
103        ":statslog-statsdatom-cts-java-gen",
104    ],
105    libs: [
106        "androidx.annotation_annotation",
107    ],
108    visibility: [
109        "//cts/hostsidetests/statsdapp/apps:__subpackages__",
110        "//vendor:__subpackages__",
111    ],
112}
113
114genrule {
115    name: "statslog-statsdatom-cts-java-gen",
116    tools: ["stats-log-api-gen"],
117    cmd: "$(location stats-log-api-gen) --java $(out) --module cts --javaPackage com.android.server.cts.device.statsdatom --javaClass StatsLogStatsdCts",
118    out: ["com/android/server/cts/device/statsdatom/StatsLogStatsdCts.java"],
119}
120