1# Copyright 2018 The Bazel Authors. 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 15"""Bazel providers for Android rules.""" 16 17 18 19AndroidAppsInfo = provider( 20 doc = "Provides information about app to install.", 21 fields = dict( 22 apps = "List of app provider artifacts.", 23 ), 24) 25 26 27 28 29 30 31 32 33AndroidJavaInfo = provider( 34 doc = "Provides outputs for the Android Java Compilation", 35 fields = dict( 36 aidl = "AndroidIdlInfo", 37 aide = "AndroidIdeInfo", 38 java = "JavaInfo", 39 ), 40) 41 42AndroidFilteredJdepsInfo = provider( 43 doc = "Provides a filtered jdeps proto.", 44 fields = dict( 45 jdeps = "Filtered jdeps", 46 ), 47) 48 49 50StarlarkApkInfo = provider( 51 doc = "Provides APK outputs of a rule.", 52 fields = dict( 53 keystore = "Keystore used to sign the APK. Deprecated, prefer signing_keys.", 54 signing_keys = "List of keys used to sign the APK", 55 signing_lineage = "Optional sigining lineage file", 56 signed_apk = "Signed APK", 57 unsigned_apk = "Unsigned APK", 58 ), 59) 60 61ResourcesNodeInfo = provider( 62 doc = "Provides information for building ResourceProcessorBusyBox flags", 63 fields = dict( 64 label = "A label, the target's label", 65 66 # Assets related fields 67 assets = "A depset of files, assets files of the target", 68 assets_dir = "A string, the name of the assets directory", 69 assets_symbols = "A file, the merged assets", 70 compiled_assets = "A file, the compiled assets", 71 72 # Resource related fields 73 resource_files = "A depset of files, resource files of the target", 74 compiled_resources = "A file, the compiled resources", 75 r_txt = "A file, the R.txt file", 76 manifest = "A file, the AndroidManifest.xml", 77 # TODO(ostonge): Add the manifest if it's exported, otherwise leave empty 78 exports_manifest = "Boolean, whether the manifest is exported", 79 ), 80) 81 82StarlarkAndroidResourcesInfo = provider( 83 doc = "Provides information about direct and transitive resources", 84 fields = dict( 85 direct_resources_nodes = "Depset of ResourcesNodeInfo providers, can contain multiple providers due to exports", 86 transitive_resources_nodes = "Depset of transitive ResourcesNodeInfo providers, not including directs", 87 transitive_assets = "Depset of transitive assets files", 88 transitive_assets_symbols = "Depset of transitive merged assets", 89 transitive_compiled_assets = "Depset of transitive compiled assets", 90 direct_compiled_resources = "Depset of direct compiled_resources, can contain multiple files due to exports", 91 transitive_compiled_resources = "Depset of transitive compiled resources", 92 transitive_manifests = "Depset of transitive manifests", 93 transitive_r_txts = "Depset of transitive R.txt files", 94 transitive_resource_files = "Depset of transitive resource files", 95 packages_to_r_txts = "Map of packages to depset of r_txt files", 96 ), 97) 98 99AndroidLintRulesInfo = provider( 100 doc = "Provides extra lint rules to use with AndroidLint.", 101 fields = dict( 102 lint_jar = "A file, a lint jar found in an aar.", 103 ), 104) 105 106AndroidFeatureModuleInfo = provider( 107 doc = "Contains data required to build an Android feature split.", 108 fields = dict( 109 binary = "String, target of the underlying split android_binary target", 110 feature_name = "String, the name of the feature module. If unspecified, the target name will be used.", 111 fused = "Boolean, whether the split is \"fused\" for the system image and for pre-L devices.", 112 library = "String, target of the underlying split android_library target", 113 manifest = "Optional AndroidManifest.xml file to use for this feature.", 114 min_sdk_version = "String, the min SDK version for this feature.", 115 title_id = "String, resource identifier for the split title.", 116 title_lib = "String, target of the split title android_library.", 117 ), 118) 119 120 121Dex2OatApkInfo = provider( 122 doc = "Contains data about artifacts generated through host dex2oat.", 123 fields = dict( 124 signed_apk = "Signed APK", 125 oat_file = "Oat file generated through dex2oat.", 126 vdex_file = "Vdex file generated through dex2oat.", 127 art_file = "ART file generated through dex2oat.", 128 ), 129) 130 131InstrumentedAppInfo = provider( 132 doc = "Contains data about an android_binary's instrumented android_binary.", 133 fields = dict( 134 android_ide_info = "AndroidIdeInfo provider from the instrumented android_binary.", 135 ), 136) 137 138FailureInfo = provider( 139 fields = dict( 140 error = "Error message", 141 ), 142) 143 144AndroidBundleInfo = provider( 145 doc = "Provides .aab outputs from a rule.", 146 fields = dict( 147 unsigned_aab = "File, the unsigned .aab", 148 ), 149) 150