• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
46android_test_helper_app {
47    name: "CtsStatsdAtomApp",
48    defaults: ["cts_defaults"],
49    platform_apis: true,
50    min_sdk_version: "28",
51    srcs: [
52        "src/**/*.java",
53        ":statslog-statsdatom-cts-java-gen",
54    ],
55    libs: [
56        "androidx.annotation_annotation",
57        "android.test.runner",
58        "junit",
59        "org.apache.http.legacy",
60    ],
61    privileged: true,
62    static_libs: [
63        "core-tests-support",
64        "ctstestrunner-axt",
65        "compatibility-device-util-axt",
66        "androidx.legacy_legacy-support-v4",
67        "androidx.test.rules",
68        "cts-net-utils",
69    ],
70    jni_libs: [
71        "liblmkhelper_statsdatom",
72        "libcrashhelper",
73    ],
74    compile_multilib: "both",
75    v4_signature: true,
76}
77
78java_library_static {
79    name: "statslog-cts",
80    srcs: [
81        ":statslog-statsdatom-cts-java-gen",
82    ],
83    libs: [
84        "androidx.annotation_annotation",
85    ],
86    visibility: [
87        "//cts/hostsidetests/statsdapp/apps:__subpackages__",
88        "//vendor:__subpackages__",
89    ],
90}
91
92genrule {
93    name: "statslog-statsdatom-cts-java-gen",
94    tools: ["stats-log-api-gen"],
95    cmd: "$(location stats-log-api-gen) --java $(out) --module cts --javaPackage com.android.server.cts.device.statsdatom --javaClass StatsLogStatsdCts",
96    out: ["com/android/server/cts/device/statsdatom/StatsLogStatsdCts.java"],
97}
98