roger xue | 843fbc4 | 2017-02-22 16:20:08 -0800 | [diff] [blame] | 1 | # Copyright (C) 2017 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 | |
Bryan Eyler | 3f55371 | 2017-06-21 17:30:21 -0700 | [diff] [blame] | 15 | ifneq ($(TARGET_BUILD_PDK), true) |
| 16 | |
roger xue | 843fbc4 | 2017-02-22 16:20:08 -0800 | [diff] [blame] | 17 | LOCAL_PATH := $(call my-dir) |
| 18 | |
| 19 | include $(CLEAR_VARS) |
| 20 | |
| 21 | # To avoid build errors, build empty package for non-platform builds |
| 22 | # (for example, projected). See b/30064991 |
| 23 | ifeq (,$(TARGET_BUILD_APPS)) |
| 24 | LOCAL_PACKAGE_NAME := CarSettings |
Lujiang Xue | a12477f | 2018-04-10 08:20:29 -0700 | [diff] [blame] | 25 | LOCAL_PRIVATE_PLATFORM_APIS := true |
roger xue | 843fbc4 | 2017-02-22 16:20:08 -0800 | [diff] [blame] | 26 | |
| 27 | LOCAL_SRC_FILES := $(call all-java-files-under, src) |
| 28 | |
Aurimas Liutikas | 5b77982 | 2017-11-14 18:29:17 -0800 | [diff] [blame] | 29 | LOCAL_USE_AAPT2 := true |
| 30 | |
Ying Zheng | e22da9b | 2018-08-17 15:47:30 -0700 | [diff] [blame] | 31 | LOCAL_JAVA_LIBRARIES := \ |
Jian Jin | 5f5c126 | 2018-09-24 15:44:16 -0700 | [diff] [blame] | 32 | android.car |
Anthony Chen | 0eaf5ff | 2018-04-30 13:32:47 -0700 | [diff] [blame] | 33 | |
roger xue | 843fbc4 | 2017-02-22 16:20:08 -0800 | [diff] [blame] | 34 | LOCAL_STATIC_ANDROID_LIBRARIES := \ |
Lujiang Xue | 8937ba5 | 2018-06-06 10:36:17 -0700 | [diff] [blame] | 35 | androidx.car_car \ |
davidln | 0a79fa0 | 2019-01-09 14:05:34 -0800 | [diff] [blame] | 36 | androidx.lifecycle_lifecycle-common-java8 \ |
davidln | b490d0e | 2018-09-28 10:01:05 -0700 | [diff] [blame] | 37 | androidx.lifecycle_lifecycle-extensions \ |
Lujiang Xue | 8937ba5 | 2018-06-06 10:36:17 -0700 | [diff] [blame] | 38 | androidx.preference_preference \ |
davidln | 72e170a | 2018-10-01 14:46:51 -0700 | [diff] [blame] | 39 | androidx-constraintlayout_constraintlayout \ |
davidln | f1494d8 | 2019-03-08 16:35:55 -0800 | [diff] [blame] | 40 | car-apps-common \ |
Anthony Chen | 0eaf5ff | 2018-04-30 13:32:47 -0700 | [diff] [blame] | 41 | car-settings-lib \ |
Roshan Agrawal | 881d4a0 | 2018-08-07 17:04:44 -0700 | [diff] [blame] | 42 | car-setup-wizard-lib \ |
kevinjm | 2c74aa7 | 2019-04-10 12:48:15 -0700 | [diff] [blame] | 43 | car-setup-wizard-lib-utils \ |
Anthony Chen | 0eaf5ff | 2018-04-30 13:32:47 -0700 | [diff] [blame] | 44 | setup-wizard-lib-gingerbread-compat \ |
| 45 | SettingsLib |
roger xue | 843fbc4 | 2017-02-22 16:20:08 -0800 | [diff] [blame] | 46 | |
| 47 | LOCAL_RESOURCE_DIR := \ |
Aurimas Liutikas | 5b77982 | 2017-11-14 18:29:17 -0800 | [diff] [blame] | 48 | $(LOCAL_PATH)/res |
roger xue | 843fbc4 | 2017-02-22 16:20:08 -0800 | [diff] [blame] | 49 | |
roger xue | 843fbc4 | 2017-02-22 16:20:08 -0800 | [diff] [blame] | 50 | LOCAL_CERTIFICATE := platform |
| 51 | |
| 52 | LOCAL_MODULE_TAGS := optional |
| 53 | |
| 54 | LOCAL_PROGUARD_ENABLED := disabled |
| 55 | |
| 56 | LOCAL_PRIVILEGED_MODULE := true |
| 57 | |
| 58 | LOCAL_DEX_PREOPT := false |
| 59 | |
davidln | b490d0e | 2018-09-28 10:01:05 -0700 | [diff] [blame] | 60 | LOCAL_STATIC_JAVA_LIBRARIES := \ |
Ying Zheng | 5b2ef4c | 2018-11-01 10:54:58 -0700 | [diff] [blame] | 61 | android.car.userlib \ |
davidln | 72e170a | 2018-10-01 14:46:51 -0700 | [diff] [blame] | 62 | androidx-constraintlayout_constraintlayout-solver \ |
Jian Jin | 5f5c126 | 2018-09-24 15:44:16 -0700 | [diff] [blame] | 63 | jsr305 |
roger xue | 843fbc4 | 2017-02-22 16:20:08 -0800 | [diff] [blame] | 64 | |
Enrico Granata | 293015e | 2017-12-12 12:16:58 -0800 | [diff] [blame] | 65 | LOCAL_DX_FLAGS := --multi-dex |
| 66 | |
Lujiang Xue | 6f1bb22 | 2018-05-16 13:54:56 -0700 | [diff] [blame] | 67 | ifdef DISABLE_AOSP_PHONE_SETTING |
Lujiang Xue | 3e9f107 | 2018-05-15 12:19:28 -0700 | [diff] [blame] | 68 | ifeq ($(DISABLE_AOSP_PHONE_SETTING),true) |
| 69 | # This will hide AOSP phone setting. |
| 70 | LOCAL_OVERRIDES_PACKAGES := Settings |
| 71 | endif |
Lujiang Xue | 2119f41 | 2018-04-20 09:07:27 -0700 | [diff] [blame] | 72 | endif |
roger xue | 843fbc4 | 2017-02-22 16:20:08 -0800 | [diff] [blame] | 73 | include $(BUILD_PACKAGE) |
| 74 | endif |
| 75 | |
davidln | a68ce7e | 2018-09-24 09:44:04 -0700 | [diff] [blame] | 76 | ################################################################################### |
| 77 | # Duplicate of CarSettings which includes testing only resources for Robolectric # |
| 78 | ################################################################################### |
| 79 | include $(CLEAR_VARS) |
| 80 | |
| 81 | # To avoid build errors, build empty package for non-platform builds |
| 82 | # (for example, projected). See b/30064991 |
| 83 | ifeq (,$(TARGET_BUILD_APPS)) |
| 84 | LOCAL_PACKAGE_NAME := CarSettingsForTesting |
| 85 | LOCAL_PRIVATE_PLATFORM_APIS := true |
| 86 | |
| 87 | LOCAL_SRC_FILES := $(call all-java-files-under, src) |
| 88 | |
| 89 | LOCAL_USE_AAPT2 := true |
| 90 | |
| 91 | LOCAL_JAVA_LIBRARIES := \ |
Ying Zheng | 5b2ef4c | 2018-11-01 10:54:58 -0700 | [diff] [blame] | 92 | android.car |
davidln | a68ce7e | 2018-09-24 09:44:04 -0700 | [diff] [blame] | 93 | |
| 94 | LOCAL_STATIC_ANDROID_LIBRARIES := \ |
davidln | a68ce7e | 2018-09-24 09:44:04 -0700 | [diff] [blame] | 95 | androidx.car_car \ |
davidln | 0a79fa0 | 2019-01-09 14:05:34 -0800 | [diff] [blame] | 96 | androidx.lifecycle_lifecycle-common-java8 \ |
davidln | b490d0e | 2018-09-28 10:01:05 -0700 | [diff] [blame] | 97 | androidx.lifecycle_lifecycle-extensions \ |
davidln | a68ce7e | 2018-09-24 09:44:04 -0700 | [diff] [blame] | 98 | androidx.preference_preference \ |
davidln | 72e170a | 2018-10-01 14:46:51 -0700 | [diff] [blame] | 99 | androidx-constraintlayout_constraintlayout \ |
davidln | f1494d8 | 2019-03-08 16:35:55 -0800 | [diff] [blame] | 100 | car-apps-common \ |
davidln | a68ce7e | 2018-09-24 09:44:04 -0700 | [diff] [blame] | 101 | car-settings-lib \ |
| 102 | car-setup-wizard-lib \ |
kevinjm | 2c74aa7 | 2019-04-10 12:48:15 -0700 | [diff] [blame] | 103 | car-setup-wizard-lib-utils \ |
davidln | a68ce7e | 2018-09-24 09:44:04 -0700 | [diff] [blame] | 104 | setup-wizard-lib-gingerbread-compat \ |
| 105 | SettingsLib |
| 106 | |
| 107 | LOCAL_RESOURCE_DIR := \ |
| 108 | $(LOCAL_PATH)/res \ |
| 109 | $(LOCAL_PATH)/tests/robotests/res |
| 110 | |
| 111 | LOCAL_CERTIFICATE := platform |
| 112 | |
| 113 | LOCAL_MODULE_TAGS := optional |
| 114 | |
| 115 | LOCAL_PROGUARD_ENABLED := disabled |
| 116 | |
| 117 | LOCAL_PRIVILEGED_MODULE := true |
| 118 | |
| 119 | LOCAL_DEX_PREOPT := false |
| 120 | |
davidln | b490d0e | 2018-09-28 10:01:05 -0700 | [diff] [blame] | 121 | LOCAL_STATIC_JAVA_LIBRARIES := \ |
Ying Zheng | 5b2ef4c | 2018-11-01 10:54:58 -0700 | [diff] [blame] | 122 | android.car.userlib \ |
davidln | 72e170a | 2018-10-01 14:46:51 -0700 | [diff] [blame] | 123 | androidx-constraintlayout_constraintlayout-solver \ |
davidln | b490d0e | 2018-09-28 10:01:05 -0700 | [diff] [blame] | 124 | jsr305 |
davidln | a68ce7e | 2018-09-24 09:44:04 -0700 | [diff] [blame] | 125 | |
| 126 | LOCAL_DX_FLAGS := --multi-dex |
| 127 | |
| 128 | ifdef DISABLE_AOSP_PHONE_SETTING |
| 129 | ifeq ($(DISABLE_AOSP_PHONE_SETTING),true) |
| 130 | # This will hide AOSP phone setting. |
| 131 | LOCAL_OVERRIDES_PACKAGES := Settings |
| 132 | endif |
| 133 | endif |
| 134 | include $(BUILD_PACKAGE) |
| 135 | endif |
| 136 | ################################################################################### |
| 137 | |
roger xue | 843fbc4 | 2017-02-22 16:20:08 -0800 | [diff] [blame] | 138 | # Use the following include to make our test apk. |
| 139 | ifeq (,$(ONE_SHOT_MAKEFILE)) |
James Lemieux | 36aeaf3 | 2017-12-14 16:08:04 -0800 | [diff] [blame] | 140 | include $(call first-makefiles-under, $(LOCAL_PATH)) |
roger xue | 843fbc4 | 2017-02-22 16:20:08 -0800 | [diff] [blame] | 141 | endif |
| 142 | |
Bryan Eyler | 3f55371 | 2017-06-21 17:30:21 -0700 | [diff] [blame] | 143 | endif |