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 "bluetooth-test-util-lib", 64 "core-tests-support", 65 "ctstestrunner-axt", 66 "compatibility-device-util-axt", 67 "androidx.legacy_legacy-support-v4", 68 "androidx.test.rules", 69 "cts-net-utils", 70 "collector-device-lib", 71 "cts_adpf_atom_common", 72 "flag-junit", 73 ], 74 jni_libs: [ 75 "liblmkhelper_statsdatom", 76 "libcrashhelper", 77 ], 78 compile_multilib: "both", 79 v4_signature: true, 80} 81 82java_library_static { 83 name: "statslog-cts", 84 srcs: [ 85 ":statslog-statsdatom-cts-java-gen", 86 ], 87 libs: [ 88 "androidx.annotation_annotation", 89 ], 90 visibility: [ 91 "//cts/hostsidetests/statsdapp/apps:__subpackages__", 92 "//vendor:__subpackages__", 93 ], 94} 95 96genrule { 97 name: "statslog-statsdatom-cts-java-gen", 98 tools: ["stats-log-api-gen"], 99 cmd: "$(location stats-log-api-gen) --java $(out) --module cts --javaPackage com.android.server.cts.device.statsdatom --javaClass StatsLogStatsdCts", 100 out: ["com/android/server/cts/device/statsdatom/StatsLogStatsdCts.java"], 101} 102