1// Copyright (C) 2014 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 15// Classic TvSettings 16package { 17 default_applicable_licenses: ["Android-Apache-2.0"], 18} 19 20filegroup { 21 name: "TvSettingsSrc", 22 srcs: [ 23 "Settings/src/**/*.java", 24 "Settings/src/**/I*.aidl", 25 "Settings/src/**/*.kt", 26 ], 27} 28 29android_library { 30 name: "TvSettingsStaticLibs", 31 manifest: "Settings/AndroidManifest-lib.xml", 32 static_libs: [ 33 "androidx-constraintlayout_constraintlayout", 34 "androidx.recyclerview_recyclerview", 35 "androidx.preference_preference", 36 "androidx.appcompat_appcompat", 37 "androidx.legacy_legacy-preference-v14", 38 "androidx.leanback_leanback-preference", 39 "androidx.leanback_leanback", 40 "androidx.lifecycle_lifecycle-extensions", 41 "androidx.lifecycle_lifecycle-common-java8", 42 "androidx.annotation_annotation", 43 "statslog-tvsettings", 44 "tvsettings-logtags", 45 "TwoPanelSettingsLib", 46 "zxing-core-1.7", 47 "TvSettingsAPI", 48 "androidx.lifecycle_lifecycle-runtime-ktx", 49 "androidx.core_core-ktx", 50 ], 51} 52 53android_library { 54 name: "TvSettingsLib", 55 manifest: "Settings/AndroidManifest.xml", 56 srcs: [ 57 ":TvSettingsSrc", 58 ], 59 aidl: { 60 local_include_dirs: ["Settings/src"], 61 }, 62 resource_dirs: [ 63 "Settings/res", 64 "Settings/res-twopanel", 65 ], 66 67 static_libs: [ 68 "TvSettingsStaticLibs", 69 ], 70 platform_apis: true, 71 // TODO(b/319716205): re-enable use_resource_processor 72 use_resource_processor: false, 73} 74 75android_app { 76 name: "TvSettings", 77 manifest: "Settings/AndroidManifest.xml", 78 srcs: [ 79 ":TvSettingsSrc", 80 ], 81 aidl: { 82 local_include_dirs: ["Settings/src"], 83 }, 84 resource_dirs: ["Settings/res"], 85 defaults: ["SettingsLibDefaults"], 86 platform_apis: true, 87 certificate: "platform", 88 system_ext_specific: true, 89 required: ["privapp_whitelist_com.android.tv.settings"], 90 optimize: { 91 optimize:true, 92 optimized_shrink_resources:true, 93 proguard_flags_files: ["Settings/proguard.flags"], 94 }, 95 privileged: true, 96 static_libs: [ 97 "TvSettingsStaticLibs", 98 ], 99 // TODO(b/319716205): re-enable use_resource_processor 100 use_resource_processor: false, 101} 102 103android_app { 104 name: "TvSettingsDebug", 105 manifest: "Settings/AndroidManifest-debug.xml", 106 additional_manifests: [ 107 "Settings/AndroidManifest.xml", 108 ], 109 srcs: [ 110 ":TvSettingsSrc", 111 ], 112 aidl: { 113 local_include_dirs: ["Settings/src"], 114 }, 115 resource_dirs: ["Settings/res"], 116 defaults: ["SettingsLibDefaults"], 117 platform_apis: true, 118 certificate: "platform", 119 system_ext_specific: true, 120 required: ["privapp_whitelist_com.android.tv.settings"], 121 optimize: { 122 proguard_flags_files: ["Settings/proguard.flags"], 123 }, 124 privileged: true, 125 static_libs: [ 126 "TvSettingsStaticLibs", 127 ], 128 // TODO(b/319716205): re-enable use_resource_processor 129 use_resource_processor: false, 130} 131 132// Two-panel TvSettings 133android_app { 134 name: "TvSettingsTwoPanel", 135 manifest: "Settings/AndroidManifest.xml", 136 dex_preopt: { 137 profile: "two-panel-baseline-profile.txt", 138 }, 139 srcs: [ 140 ":TvSettingsSrc", 141 ], 142 aidl: { 143 local_include_dirs: ["Settings/src"], 144 }, 145 // Resources in res-twopanel should be applied last so they take precedence 146 resource_dirs: [ 147 "Settings/res", 148 "Settings/res-twopanel", 149 ], 150 overrides: ["TvSettings"], 151 defaults: ["SettingsLibDefaults"], 152 platform_apis: true, 153 certificate: "platform", 154 system_ext_specific: true, 155 required: ["privapp_whitelist_com.android.tv.settings"], 156 optimize: { 157 optimize:true, 158 optimized_shrink_resources:true, 159 proguard_flags_files: ["Settings/proguard.flags"], 160 }, 161 privileged: true, 162 static_libs: [ 163 "TvSettingsStaticLibs", 164 ], 165 jacoco: { 166 include_filter: [ 167 "com.android.tv.settings.*", 168 "com.android.settingslib.*", 169 "com.android.tv.twopanelsettingsoverlay.*", 170 ], 171 }, 172 // TODO(b/319716205): re-enable use_resource_processor 173 use_resource_processor: false, 174} 175 176// Two-panel TvSettings 0 Debug 177android_app { 178 name: "TvSettingsTwoPanelDebug", 179 manifest: "Settings/AndroidManifest-debug.xml", 180 additional_manifests: [ 181 "Settings/AndroidManifest.xml", 182 ], 183 srcs: [ 184 ":TvSettingsSrc", 185 ], 186 aidl: { 187 local_include_dirs: ["Settings/src"], 188 }, 189 // Resources in res-twopanel should be applied last so they take precedence 190 resource_dirs: [ 191 "Settings/res", 192 "Settings/res-twopanel", 193 ], 194 overrides: ["TvSettings"], 195 defaults: ["SettingsLibDefaults"], 196 platform_apis: true, 197 certificate: "platform", 198 system_ext_specific: true, 199 required: ["privapp_whitelist_com.android.tv.settings"], 200 optimize: { 201 proguard_flags_files: ["Settings/proguard.flags"], 202 }, 203 privileged: true, 204 static_libs: [ 205 "TvSettingsStaticLibs", 206 ], 207 // TODO(b/319716205): re-enable use_resource_processor 208 use_resource_processor: false, 209} 210