blob: 2e19d0068ecd2158a829c760e05c2bd75bed8535 [file] [log] [blame]
roger xue843fbc42017-02-22 16:20:08 -08001# 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 Eyler3f553712017-06-21 17:30:21 -070015ifneq ($(TARGET_BUILD_PDK), true)
16
roger xue843fbc42017-02-22 16:20:08 -080017LOCAL_PATH := $(call my-dir)
18
19include $(CLEAR_VARS)
20
21# To avoid build errors, build empty package for non-platform builds
22# (for example, projected). See b/30064991
23ifeq (,$(TARGET_BUILD_APPS))
24 LOCAL_PACKAGE_NAME := CarSettings
Lujiang Xuea12477f2018-04-10 08:20:29 -070025 LOCAL_PRIVATE_PLATFORM_APIS := true
roger xue843fbc42017-02-22 16:20:08 -080026
27 LOCAL_SRC_FILES := $(call all-java-files-under, src)
28
Aurimas Liutikas5b779822017-11-14 18:29:17 -080029 LOCAL_USE_AAPT2 := true
30
Ying Zhenge22da9b2018-08-17 15:47:30 -070031 LOCAL_JAVA_LIBRARIES := \
davidlnf6949dc2019-05-06 16:30:24 -070032 android.car \
33 telephony-common
Anthony Chen0eaf5ff2018-04-30 13:32:47 -070034
roger xue843fbc42017-02-22 16:20:08 -080035 LOCAL_STATIC_ANDROID_LIBRARIES := \
Lujiang Xue8937ba52018-06-06 10:36:17 -070036 androidx.car_car \
davidln0a79fa02019-01-09 14:05:34 -080037 androidx.lifecycle_lifecycle-common-java8 \
davidlnb490d0e2018-09-28 10:01:05 -070038 androidx.lifecycle_lifecycle-extensions \
Lujiang Xue8937ba52018-06-06 10:36:17 -070039 androidx.preference_preference \
davidln72e170a2018-10-01 14:46:51 -070040 androidx-constraintlayout_constraintlayout \
davidlnf1494d82019-03-08 16:35:55 -080041 car-apps-common \
Anthony Chen0eaf5ff2018-04-30 13:32:47 -070042 car-settings-lib \
Roshan Agrawal881d4a02018-08-07 17:04:44 -070043 car-setup-wizard-lib \
kevinjm2c74aa72019-04-10 12:48:15 -070044 car-setup-wizard-lib-utils \
Anthony Chen0eaf5ff2018-04-30 13:32:47 -070045 setup-wizard-lib-gingerbread-compat \
46 SettingsLib
roger xue843fbc42017-02-22 16:20:08 -080047
48 LOCAL_RESOURCE_DIR := \
Aurimas Liutikas5b779822017-11-14 18:29:17 -080049 $(LOCAL_PATH)/res
roger xue843fbc42017-02-22 16:20:08 -080050
roger xue843fbc42017-02-22 16:20:08 -080051 LOCAL_CERTIFICATE := platform
52
53 LOCAL_MODULE_TAGS := optional
54
55 LOCAL_PROGUARD_ENABLED := disabled
56
57 LOCAL_PRIVILEGED_MODULE := true
58
59 LOCAL_DEX_PREOPT := false
60
davidlnb490d0e2018-09-28 10:01:05 -070061 LOCAL_STATIC_JAVA_LIBRARIES := \
Ying Zheng5b2ef4c2018-11-01 10:54:58 -070062 android.car.userlib \
davidln72e170a2018-10-01 14:46:51 -070063 androidx-constraintlayout_constraintlayout-solver \
Jian Jin5f5c1262018-09-24 15:44:16 -070064 jsr305
roger xue843fbc42017-02-22 16:20:08 -080065
Enrico Granata293015e2017-12-12 12:16:58 -080066 LOCAL_DX_FLAGS := --multi-dex
67
Lujiang Xue6f1bb222018-05-16 13:54:56 -070068 ifdef DISABLE_AOSP_PHONE_SETTING
Lujiang Xue3e9f1072018-05-15 12:19:28 -070069 ifeq ($(DISABLE_AOSP_PHONE_SETTING),true)
70 # This will hide AOSP phone setting.
71 LOCAL_OVERRIDES_PACKAGES := Settings
72 endif
Lujiang Xue2119f412018-04-20 09:07:27 -070073 endif
roger xue843fbc42017-02-22 16:20:08 -080074 include $(BUILD_PACKAGE)
75endif
76
davidlna68ce7e2018-09-24 09:44:04 -070077###################################################################################
78# Duplicate of CarSettings which includes testing only resources for Robolectric #
79###################################################################################
80include $(CLEAR_VARS)
81
82# To avoid build errors, build empty package for non-platform builds
83# (for example, projected). See b/30064991
84ifeq (,$(TARGET_BUILD_APPS))
85 LOCAL_PACKAGE_NAME := CarSettingsForTesting
86 LOCAL_PRIVATE_PLATFORM_APIS := true
87
88 LOCAL_SRC_FILES := $(call all-java-files-under, src)
89
90 LOCAL_USE_AAPT2 := true
91
92 LOCAL_JAVA_LIBRARIES := \
davidlnf6949dc2019-05-06 16:30:24 -070093 android.car \
94 telephony-common
davidlna68ce7e2018-09-24 09:44:04 -070095
96 LOCAL_STATIC_ANDROID_LIBRARIES := \
davidlna68ce7e2018-09-24 09:44:04 -070097 androidx.car_car \
davidln0a79fa02019-01-09 14:05:34 -080098 androidx.lifecycle_lifecycle-common-java8 \
davidlnb490d0e2018-09-28 10:01:05 -070099 androidx.lifecycle_lifecycle-extensions \
davidlna68ce7e2018-09-24 09:44:04 -0700100 androidx.preference_preference \
davidln72e170a2018-10-01 14:46:51 -0700101 androidx-constraintlayout_constraintlayout \
davidlnf1494d82019-03-08 16:35:55 -0800102 car-apps-common \
davidlna68ce7e2018-09-24 09:44:04 -0700103 car-settings-lib \
104 car-setup-wizard-lib \
kevinjm2c74aa72019-04-10 12:48:15 -0700105 car-setup-wizard-lib-utils \
davidlna68ce7e2018-09-24 09:44:04 -0700106 setup-wizard-lib-gingerbread-compat \
107 SettingsLib
108
109 LOCAL_RESOURCE_DIR := \
110 $(LOCAL_PATH)/res \
111 $(LOCAL_PATH)/tests/robotests/res
112
113 LOCAL_CERTIFICATE := platform
114
115 LOCAL_MODULE_TAGS := optional
116
117 LOCAL_PROGUARD_ENABLED := disabled
118
119 LOCAL_PRIVILEGED_MODULE := true
120
121 LOCAL_DEX_PREOPT := false
122
davidlnb490d0e2018-09-28 10:01:05 -0700123 LOCAL_STATIC_JAVA_LIBRARIES := \
Ying Zheng5b2ef4c2018-11-01 10:54:58 -0700124 android.car.userlib \
davidln72e170a2018-10-01 14:46:51 -0700125 androidx-constraintlayout_constraintlayout-solver \
davidlnb490d0e2018-09-28 10:01:05 -0700126 jsr305
davidlna68ce7e2018-09-24 09:44:04 -0700127
128 LOCAL_DX_FLAGS := --multi-dex
129
130 ifdef DISABLE_AOSP_PHONE_SETTING
131 ifeq ($(DISABLE_AOSP_PHONE_SETTING),true)
132 # This will hide AOSP phone setting.
133 LOCAL_OVERRIDES_PACKAGES := Settings
134 endif
135 endif
136 include $(BUILD_PACKAGE)
137endif
138###################################################################################
139
roger xue843fbc42017-02-22 16:20:08 -0800140# Use the following include to make our test apk.
141ifeq (,$(ONE_SHOT_MAKEFILE))
James Lemieux36aeaf32017-12-14 16:08:04 -0800142include $(call first-makefiles-under, $(LOCAL_PATH))
roger xue843fbc42017-02-22 16:20:08 -0800143endif
144
Bryan Eyler3f553712017-06-21 17:30:21 -0700145endif