• Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2018 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_static {
22    name: "lib_apex_manifest_proto",
23    host_supported: true,
24    proto: {
25        export_proto_headers: true,
26        type: "full",
27    },
28    srcs: ["apex_manifest.proto"],
29}
30
31cc_library_static {
32    name: "lib_apex_manifest_proto_lite",
33    host_supported: true,
34    recovery_available: true,
35    proto: {
36        export_proto_headers: true,
37        type: "lite",
38    },
39    srcs: ["apex_manifest.proto"],
40    apex_available: [
41        "//apex_available:platform",
42        "com.android.runtime",
43    ],
44}
45
46python_library_host {
47    name: "apex_manifest_proto",
48    version: {
49        py2: {
50            enabled: true,
51        },
52        py3: {
53            enabled: true,
54        },
55    },
56    srcs: [
57        "apex_manifest.proto",
58    ],
59    proto: {
60        canonical_path_from_root: false,
61    },
62}
63
64python_library_host {
65    name: "apex_build_info_proto",
66    version: {
67        py2: {
68            enabled: true,
69        },
70        py3: {
71            enabled: true,
72        },
73    },
74    srcs: [
75        "apex_build_info.proto",
76    ],
77    proto: {
78        canonical_path_from_root: false,
79    },
80}
81
82java_library_static {
83    name: "apex_manifest_proto_java",
84    host_supported: true,
85    device_supported: false,
86    proto: {
87        type: "full",
88    },
89    srcs: ["apex_manifest.proto"],
90}
91
92cc_library_static {
93    name: "lib_apex_session_state_proto",
94    host_supported: true,
95    proto: {
96        export_proto_headers: true,
97        type: "full",
98    },
99    srcs: ["session_state.proto"],
100}
101
102genrule {
103    name: "apex-protos",
104    tools: ["soong_zip"],
105    dist: {
106        targets: ["apexer_tools"],
107    },
108    srcs: [
109        "apex_manifest.proto",
110        "apex_build_info.proto",
111    ],
112    out: ["apex-protos.zip"],
113    cmd: "mkdir $(genDir)/protos && " +
114        "cp $(in) $(genDir)/protos && " +
115        "$(location soong_zip) -o $(out) -C $(genDir)/protos -D $(genDir)/protos",
116}
117