xref: /aosp_15_r20/frameworks/proto_logging/stats/express/Android.bp (revision 64c55175f22a2714b5ba1250098ad9bbc12ec7cd)
1//
2// Copyright (C) 2022 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_host_shared {
22    name: "libexpressconfig_proto_host",
23    srcs: [
24        "express_config.proto",
25    ],
26
27    proto: {
28        type: "full",
29        export_proto_headers: true,
30        include_dirs: [
31            "external/protobuf/src",
32        ],
33    },
34}
35
36java_library {
37    name: "expresslog-catalog",
38    sdk_version: "module_current",
39    min_sdk_version: "30",
40    apex_available: [
41        "//apex_available:anyapex",
42        "//apex_available:platform",
43    ],
44    srcs: [
45        ":expresslog-catalog-gen",
46    ],
47}
48
49filegroup {
50    name: "metric_config_files",
51    srcs: [
52        "catalog/**/*.cfg",
53    ],
54}
55
56genrule {
57    name: "expresslog-catalog-gen",
58    tools: ["expresscatalog-codegen"],
59    cmd: "$(location expresscatalog-codegen) " +
60        " --java $(out)" +
61        " --javaPackage com.android.modules.expresslog" +
62        " --javaClass MetricIds",
63    out: [
64        "com/android/modules/expresslog/MetricIds.java",
65    ],
66    srcs: [
67        ":metric_config_files",
68    ],
69}
70