1// Copyright (C) 2023 The Android Open Source Project 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 15package { 16 default_applicable_licenses: ["Android-Apache-2.0"], 17} 18 19apex_key { 20 name: "com.android.profiling.key", 21 public_key: "com.android.profiling.avbpubkey", 22 private_key: "com.android.profiling.pem", 23} 24 25android_app_certificate { 26 name: "com.android.profiling.certificate", 27 certificate: "com.android.profiling", 28} 29 30soong_config_module_type { 31 name: "custom_apex", 32 module_type: "apex", 33 config_namespace: "ANDROID", 34 bool_variables: [ 35 "release_package_profiling_module", 36 ], 37 properties: [ 38 "enabled", 39 ], 40} 41 42custom_apex { 43 // This apex will be enabled with release_package_profiling_module flag 44 enabled: false, 45 soong_config_variables: { 46 release_package_profiling_module: { 47 enabled: true, 48 }, 49 }, 50 51 name: "com.android.profiling", 52 manifest: "manifest.json", 53 file_contexts: ":apex.test-file_contexts", 54 key: "com.android.profiling.key", 55 certificate: ":com.android.profiling.certificate", 56 defaults: ["v-launched-apex-module"], 57 min_sdk_version: "current", 58 59 bootclasspath_fragments: ["com.android.profiling-bootclasspath-fragment"], 60 systemserverclasspath_fragments: ["com.android.profiling-systemserverclasspath-fragment"], 61} 62 63soong_config_module_type { 64 name: "custom_systemserverclasspath_fragment", 65 module_type: "systemserverclasspath_fragment", 66 config_namespace: "ANDROID", 67 bool_variables: [ 68 "release_package_profiling_module", 69 ], 70 properties: [ 71 "enabled", 72 ], 73} 74 75custom_systemserverclasspath_fragment { 76 // This fragment will be enabled with release_package_profiling_module flag 77 enabled: false, 78 soong_config_variables: { 79 release_package_profiling_module: { 80 enabled: true, 81 }, 82 }, 83 84 name: "com.android.profiling-systemserverclasspath-fragment", 85 standalone_contents: ["service-profiling"], 86 apex_available: ["com.android.profiling"], 87} 88 89soong_config_module_type { 90 name: "custom_bootclasspath_fragment", 91 module_type: "bootclasspath_fragment", 92 config_namespace: "ANDROID", 93 bool_variables: [ 94 "release_package_profiling_module", 95 ], 96 properties: [ 97 "enabled", 98 ], 99} 100 101custom_bootclasspath_fragment { 102 // This fragment will be enabled with release_package_profiling_module flag 103 enabled: false, 104 soong_config_variables: { 105 release_package_profiling_module: { 106 enabled: true, 107 }, 108 }, 109 110 name: "com.android.profiling-bootclasspath-fragment", 111 contents: ["framework-profiling"], 112 apex_available: ["com.android.profiling"], 113 114 // The bootclasspath_fragments that provide APIs on which this depends. 115 fragments: [ 116 { 117 apex: "com.android.art", 118 module: "art-bootclasspath-fragment", 119 }, 120 ], 121 122 // Additional stubs libraries that this fragment's contents use which are 123 // not provided by another bootclasspath_fragment. 124 additional_stubs: [ 125 "android-non-updatable", 126 ], 127 128 hidden_api: { 129 split_packages: ["*"], 130 }, 131} 132