// Copyright (C) 2019 The Android Open Source Project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package { default_applicable_licenses: ["Android-Apache-2.0"], } android_library { name: "CarSettings-core", platform_apis: true, defaults: [ "SettingsLibDefaults", "SettingsLib-search-defaults", ], srcs: [ "src/**/*.kt", "src/**/*.java", ], static_libs: [ "androidx.lifecycle_lifecycle-common-java8", "androidx.lifecycle_lifecycle-extensions", "androidx.preference_preference", "androidx-constraintlayout_constraintlayout", "androidx.test.core", "car-apps-common", "car-setup-wizard-lib-utils", "WifiTrackerLib", "SettingsLib", "SettingsLib-search", "androidx-constraintlayout_constraintlayout-solver", "jsr305", "car-ui-lib", "car-admin-ui-lib", "car-helper-lib", "car-qc-lib", "com_android_car_settings_flags_lib", "services.core", "car-data-subscription-lib", "car-resource-common", ], libs: [ "android.car", ], manifest: "AndroidManifest.xml", resource_dirs: ["res"], // TODO(b/319708040): re-enable use_resource_processor use_resource_processor: false, } android_app { name: "CarSettings", overrides: ["Settings"], platform_apis: true, static_libs: [ "CarSettings-core", ], libs: [ "android.car", ], certificate: "platform", optimize: { proguard_flags_files: ["proguard.flags"], }, privileged: true, dex_preopt: { enabled: false, }, required: ["allowed_privapp_com.android.car.settings"], dxflags: ["--multi-dex"], } // Duplicate of CarSettings which includes testing only resources for Robolectric android_app { name: "CarSettingsForTesting", platform_apis: true, defaults: [ "SettingsLibDefaults", "SettingsLib-search-defaults", ], srcs: [ "src/**/*.kt", "src/**/*.java", ], libs: [ "android.car", ], static_libs: [ "CarSettings-core", ], // Testing only resources must be applied last so they take precedence. resource_dirs: [ "res", "tests/robotests/res", ], certificate: "platform", optimize: { enabled: false, }, privileged: true, dex_preopt: { enabled: false, }, dxflags: ["--multi-dex"], // TODO(b/319708040): re-enable use_resource_processor use_resource_processor: false, } android_library { name: "CarSettingsForUnitTesting", platform_apis: true, defaults: [ "SettingsLibDefaults", "SettingsLib-search-defaults", ], manifest: "tests/unit/AndroidManifest.xml", srcs: [ "src/**/*.kt", "src/**/*.java", ], libs: [ "android.car", ], static_libs: [ "androidx.lifecycle_lifecycle-common-java8", "androidx.lifecycle_lifecycle-extensions", "androidx.preference_preference", "androidx-constraintlayout_constraintlayout", "car-apps-common", "car-setup-wizard-lib-utils", "WifiTrackerLib", "SettingsLib", "SettingsLib-search", "androidx-constraintlayout_constraintlayout-solver", "jsr305", "car-admin-ui-lib", "car-helper-lib", "car-qc-lib", "com_android_car_settings_flags_lib", "car-data-subscription-lib", ], // Testing only resources must be applied last so they take precedence. resource_dirs: [ "res", "tests/unit/res", ], optimize: { enabled: false, }, dex_preopt: { enabled: false, }, dxflags: ["--multi-dex"], aaptflags: ["--extra-packages com.android.car.settings"], // TODO(b/319708040): re-enable use_resource_processor use_resource_processor: false, } filegroup { name: "CarSettings_proguard_flags", srcs: ["proguard.flags"], }