xref: /aosp_15_r20/frameworks/proto_logging/stats/stats_log_api_gen/test_java/Android.bp (revision 64c55175f22a2714b5ba1250098ad9bbc12ec7cd)
1//
2// Copyright (C) 2023 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_team: "trendy_team_android_telemetry_client_infra",
19    default_applicable_licenses: ["Android-Apache-2.0"],
20}
21
22android_test {
23    name: "VendorAtomCodeGenJavaTest",
24    test_suites: [
25        "general-tests",
26    ],
27    srcs: [
28        "src/**/*.java",
29        ":test-vendor-atom-java-gen",
30    ],
31    static_libs: [
32        "junit",
33        "android.frameworks.stats-V2-java",
34        "compatibility-device-util-axt",
35    ],
36    libs: [
37        "android.test.runner.stubs.system",
38    ],
39}
40
41genrule {
42    name: "test-vendor-atom-java-gen",
43    tools: ["stats-log-api-gen"],
44    cmd: "$(location stats-log-api-gen) --java $(out)" +
45        " --module test" +
46        " --javaPackage com.android.test.statslogapigen" +
47        " --javaClass VendorAtomsLog" +
48        " --vendor-proto frameworks/proto_logging/stats/stats_log_api_gen/test_vendor_atoms.proto",
49    out: [
50        "com/android/test/statslogapigen/VendorAtomsLog.java",
51    ],
52    srcs: [
53        ":stats_log_api_gen_test_protos",
54        ":libprotobuf-internal-descriptor-proto",
55        ":libstats_atom_options_protos",
56    ],
57}
58