blob: c34ed9515fab28d2352ed870d5520932ce03a939 [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 := \
Jian Jin5f5c1262018-09-24 15:44:16 -070032 android.car
Anthony Chen0eaf5ff2018-04-30 13:32:47 -070033
roger xue843fbc42017-02-22 16:20:08 -080034 LOCAL_STATIC_ANDROID_LIBRARIES := \
Lujiang Xue8937ba52018-06-06 10:36:17 -070035 androidx.car_car \
davidln0a79fa02019-01-09 14:05:34 -080036 androidx.lifecycle_lifecycle-common-java8 \
davidlnb490d0e2018-09-28 10:01:05 -070037 androidx.lifecycle_lifecycle-extensions \
Lujiang Xue8937ba52018-06-06 10:36:17 -070038 androidx.preference_preference \
davidln72e170a2018-10-01 14:46:51 -070039 androidx-constraintlayout_constraintlayout \
Anthony Chen0eaf5ff2018-04-30 13:32:47 -070040 car-settings-lib \
Roshan Agrawal881d4a02018-08-07 17:04:44 -070041 car-setup-wizard-lib \
davidlne90962b2018-11-05 14:44:31 -080042 car-theme-lib \
Anthony Chen0eaf5ff2018-04-30 13:32:47 -070043 setup-wizard-lib-gingerbread-compat \
44 SettingsLib
roger xue843fbc42017-02-22 16:20:08 -080045
46 LOCAL_RESOURCE_DIR := \
Aurimas Liutikas5b779822017-11-14 18:29:17 -080047 $(LOCAL_PATH)/res
roger xue843fbc42017-02-22 16:20:08 -080048
roger xue843fbc42017-02-22 16:20:08 -080049 LOCAL_CERTIFICATE := platform
50
51 LOCAL_MODULE_TAGS := optional
52
53 LOCAL_PROGUARD_ENABLED := disabled
54
55 LOCAL_PRIVILEGED_MODULE := true
56
57 LOCAL_DEX_PREOPT := false
58
davidlnb490d0e2018-09-28 10:01:05 -070059 LOCAL_STATIC_JAVA_LIBRARIES := \
Ying Zheng5b2ef4c2018-11-01 10:54:58 -070060 android.car.userlib \
davidln72e170a2018-10-01 14:46:51 -070061 androidx-constraintlayout_constraintlayout-solver \
Jian Jin5f5c1262018-09-24 15:44:16 -070062 jsr305
roger xue843fbc42017-02-22 16:20:08 -080063
Enrico Granata293015e2017-12-12 12:16:58 -080064 LOCAL_DX_FLAGS := --multi-dex
65
Lujiang Xue6f1bb222018-05-16 13:54:56 -070066 ifdef DISABLE_AOSP_PHONE_SETTING
Lujiang Xue3e9f1072018-05-15 12:19:28 -070067 ifeq ($(DISABLE_AOSP_PHONE_SETTING),true)
68 # This will hide AOSP phone setting.
69 LOCAL_OVERRIDES_PACKAGES := Settings
70 endif
Lujiang Xue2119f412018-04-20 09:07:27 -070071 endif
roger xue843fbc42017-02-22 16:20:08 -080072 include $(BUILD_PACKAGE)
73endif
74
davidlna68ce7e2018-09-24 09:44:04 -070075###################################################################################
76# Duplicate of CarSettings which includes testing only resources for Robolectric #
77###################################################################################
78include $(CLEAR_VARS)
79
80# To avoid build errors, build empty package for non-platform builds
81# (for example, projected). See b/30064991
82ifeq (,$(TARGET_BUILD_APPS))
83 LOCAL_PACKAGE_NAME := CarSettingsForTesting
84 LOCAL_PRIVATE_PLATFORM_APIS := true
85
86 LOCAL_SRC_FILES := $(call all-java-files-under, src)
87
88 LOCAL_USE_AAPT2 := true
89
90 LOCAL_JAVA_LIBRARIES := \
Ying Zheng5b2ef4c2018-11-01 10:54:58 -070091 android.car
davidlna68ce7e2018-09-24 09:44:04 -070092
93 LOCAL_STATIC_ANDROID_LIBRARIES := \
davidlna68ce7e2018-09-24 09:44:04 -070094 androidx.car_car \
davidln0a79fa02019-01-09 14:05:34 -080095 androidx.lifecycle_lifecycle-common-java8 \
davidlnb490d0e2018-09-28 10:01:05 -070096 androidx.lifecycle_lifecycle-extensions \
davidlna68ce7e2018-09-24 09:44:04 -070097 androidx.preference_preference \
davidln72e170a2018-10-01 14:46:51 -070098 androidx-constraintlayout_constraintlayout \
davidlna68ce7e2018-09-24 09:44:04 -070099 car-settings-lib \
100 car-setup-wizard-lib \
davidlne90962b2018-11-05 14:44:31 -0800101 car-theme-lib \
davidlna68ce7e2018-09-24 09:44:04 -0700102 setup-wizard-lib-gingerbread-compat \
103 SettingsLib
104
105 LOCAL_RESOURCE_DIR := \
106 $(LOCAL_PATH)/res \
107 $(LOCAL_PATH)/tests/robotests/res
108
109 LOCAL_CERTIFICATE := platform
110
111 LOCAL_MODULE_TAGS := optional
112
113 LOCAL_PROGUARD_ENABLED := disabled
114
115 LOCAL_PRIVILEGED_MODULE := true
116
117 LOCAL_DEX_PREOPT := false
118
davidlnb490d0e2018-09-28 10:01:05 -0700119 LOCAL_STATIC_JAVA_LIBRARIES := \
Ying Zheng5b2ef4c2018-11-01 10:54:58 -0700120 android.car.userlib \
davidln72e170a2018-10-01 14:46:51 -0700121 androidx-constraintlayout_constraintlayout-solver \
davidlnb490d0e2018-09-28 10:01:05 -0700122 jsr305
davidlna68ce7e2018-09-24 09:44:04 -0700123
124 LOCAL_DX_FLAGS := --multi-dex
125
126 ifdef DISABLE_AOSP_PHONE_SETTING
127 ifeq ($(DISABLE_AOSP_PHONE_SETTING),true)
128 # This will hide AOSP phone setting.
129 LOCAL_OVERRIDES_PACKAGES := Settings
130 endif
131 endif
132 include $(BUILD_PACKAGE)
133endif
134###################################################################################
135
roger xue843fbc42017-02-22 16:20:08 -0800136# Use the following include to make our test apk.
137ifeq (,$(ONE_SHOT_MAKEFILE))
James Lemieux36aeaf32017-12-14 16:08:04 -0800138include $(call first-makefiles-under, $(LOCAL_PATH))
roger xue843fbc42017-02-22 16:20:08 -0800139endif
140
Bryan Eyler3f553712017-06-21 17:30:21 -0700141endif