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 46rust_protobuf { 47 name: "libapex_manifest_rs", 48 protos: ["apex_manifest.proto"], 49 crate_name: "apex_manifest", 50 source_stem: "apex_manifest", 51} 52 53python_library_host { 54 name: "apex_manifest_proto", 55 srcs: [ 56 "apex_manifest.proto", 57 ], 58 proto: { 59 canonical_path_from_root: false, 60 }, 61} 62 63python_library_host { 64 name: "apex_build_info_proto", 65 srcs: [ 66 "apex_build_info.proto", 67 ], 68 proto: { 69 canonical_path_from_root: false, 70 }, 71} 72 73java_library_static { 74 name: "apex_manifest_proto_java", 75 host_supported: true, 76 device_supported: false, 77 proto: { 78 type: "full", 79 }, 80 srcs: ["apex_manifest.proto"], 81} 82 83cc_library_static { 84 name: "lib_apex_session_state_proto", 85 host_supported: true, 86 proto: { 87 export_proto_headers: true, 88 type: "full", 89 }, 90 srcs: ["session_state.proto"], 91} 92 93genrule { 94 name: "apex-protos", 95 tools: ["soong_zip"], 96 dist: { 97 targets: ["apexer_tools"], 98 }, 99 srcs: [ 100 "apex_manifest.proto", 101 "apex_build_info.proto", 102 ], 103 out: ["apex-protos.zip"], 104 cmd: "mkdir $(genDir)/protos && " + 105 "cp $(in) $(genDir)/protos && " + 106 "$(location soong_zip) -o $(out) -C $(genDir)/protos -D $(genDir)/protos", 107} 108