1// Copyright 2021 Google Inc. All Rights Reserved. 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto2"; 16 17package build_license_metadata; 18option go_package = "android/soong/compliance/license_metadata_proto"; 19 20message LicenseMetadata { 21 // package_name identifies the source package. License texts are named relative to the package name. 22 optional string package_name = 1; 23 24 repeated string module_types = 2; 25 26 repeated string module_classes = 3; 27 28 // projects identifies the git project(s) containing the associated source code. 29 repeated string projects = 4; 30 31 // license_kinds lists the kinds of licenses. e.g. SPDX-license-identifier-Apache-2.0 or legacy_notice. 32 repeated string license_kinds = 5; 33 34 // license_conditions lists the conditions that apply to the license kinds. e.g. notice or restricted. 35 repeated string license_conditions = 6; 36 37 // license_texts lists the filenames of the associated license text(s). 38 repeated string license_texts = 7; 39 40 // is_container is true for target types that merely aggregate. e.g. .img or .zip files. 41 optional bool is_container = 8; 42 43 // built lists the built targets. 44 repeated string built = 9; 45 46 // installed lists the installed targets. 47 repeated string installed = 10; 48 49 // installMap identifies the substitutions to make to path names when moving into installed location. 50 repeated InstallMap install_map = 11; 51 52 // sources lists the targets depended on. 53 repeated string sources = 12; 54 55 // deps lists the license metadata files depended on. 56 repeated AnnotatedDependency deps = 13; 57} 58 59// InstallMap messages describe the mapping from an input filesystem file to the path to the file 60// in a container. 61message InstallMap { 62 // The input path on the filesystem. 63 optional string from_path = 1; 64 65 // The path to the file inside the container or installed location. 66 optional string container_path = 2; 67} 68 69// AnnotateDepencency messages describe edges in the build graph. 70message AnnotatedDependency { 71 // The path to the dependency license metadata file. 72 optional string file = 1; 73 74 // The annotations attached to the dependency. 75 repeated string annotations = 2; 76} 77