blob: ea31d6c5e5e27eac1e0b60311abb60873f413247 [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
davidlnb32875a2019-05-17 10:22:24 -070025 LOCAL_OVERRIDES_PACKAGES := Settings
Lujiang Xuea12477f2018-04-10 08:20:29 -070026 LOCAL_PRIVATE_PLATFORM_APIS := true
roger xue843fbc42017-02-22 16:20:08 -080027
28 LOCAL_SRC_FILES := $(call all-java-files-under, src)
29
Aurimas Liutikas5b779822017-11-14 18:29:17 -080030 LOCAL_USE_AAPT2 := true
31
Ying Zhenge22da9b2018-08-17 15:47:30 -070032 LOCAL_JAVA_LIBRARIES := \
davidlnf6949dc2019-05-06 16:30:24 -070033 android.car \
34 telephony-common
Anthony Chen0eaf5ff2018-04-30 13:32:47 -070035
roger xue843fbc42017-02-22 16:20:08 -080036 LOCAL_STATIC_ANDROID_LIBRARIES := \
Lujiang Xue8937ba52018-06-06 10:36:17 -070037 androidx.car_car \
davidln0a79fa02019-01-09 14:05:34 -080038 androidx.lifecycle_lifecycle-common-java8 \
davidlnb490d0e2018-09-28 10:01:05 -070039 androidx.lifecycle_lifecycle-extensions \
Lujiang Xue8937ba52018-06-06 10:36:17 -070040 androidx.preference_preference \
davidln72e170a2018-10-01 14:46:51 -070041 androidx-constraintlayout_constraintlayout \
davidlnf1494d82019-03-08 16:35:55 -080042 car-apps-common \
Anthony Chen0eaf5ff2018-04-30 13:32:47 -070043 car-settings-lib \
kevinjm2c74aa72019-04-10 12:48:15 -070044 car-setup-wizard-lib-utils \
Anthony Chen0eaf5ff2018-04-30 13:32:47 -070045 SettingsLib
roger xue843fbc42017-02-22 16:20:08 -080046
Priyank Singh240b0932019-05-22 18:12:41 -070047 # Including the resources for the static android libraries allows this app to pick up their static overlays.
48 LOCAL_RESOURCE_DIR += \
49 $(LOCAL_PATH)/res \
50 $(LOCAL_PATH)/../libs/car-apps-common/res \
51 $(LOCAL_PATH)/../libs/car-settings-lib/res \
52 $(LOCAL_PATH)/../../../../frameworks/base/packages/SettingsLib/res
roger xue843fbc42017-02-22 16:20:08 -080053
roger xue843fbc42017-02-22 16:20:08 -080054 LOCAL_CERTIFICATE := platform
55
56 LOCAL_MODULE_TAGS := optional
57
58 LOCAL_PROGUARD_ENABLED := disabled
59
60 LOCAL_PRIVILEGED_MODULE := true
61
62 LOCAL_DEX_PREOPT := false
63
davidlnb490d0e2018-09-28 10:01:05 -070064 LOCAL_STATIC_JAVA_LIBRARIES := \
Ying Zheng5b2ef4c2018-11-01 10:54:58 -070065 android.car.userlib \
davidln72e170a2018-10-01 14:46:51 -070066 androidx-constraintlayout_constraintlayout-solver \
Jian Jin5f5c1262018-09-24 15:44:16 -070067 jsr305
roger xue843fbc42017-02-22 16:20:08 -080068
Enrico Granata293015e2017-12-12 12:16:58 -080069 LOCAL_DX_FLAGS := --multi-dex
70
roger xue843fbc42017-02-22 16:20:08 -080071 include $(BUILD_PACKAGE)
72endif
73
davidlna68ce7e2018-09-24 09:44:04 -070074###################################################################################
75# Duplicate of CarSettings which includes testing only resources for Robolectric #
76###################################################################################
77include $(CLEAR_VARS)
78
79# To avoid build errors, build empty package for non-platform builds
80# (for example, projected). See b/30064991
81ifeq (,$(TARGET_BUILD_APPS))
82 LOCAL_PACKAGE_NAME := CarSettingsForTesting
davidlnb32875a2019-05-17 10:22:24 -070083 LOCAL_OVERRIDES_PACKAGES := Settings
davidlna68ce7e2018-09-24 09:44:04 -070084 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 := \
davidlnf6949dc2019-05-06 16:30:24 -070091 android.car \
92 telephony-common
davidlna68ce7e2018-09-24 09:44:04 -070093
94 LOCAL_STATIC_ANDROID_LIBRARIES := \
davidlna68ce7e2018-09-24 09:44:04 -070095 androidx.car_car \
davidln0a79fa02019-01-09 14:05:34 -080096 androidx.lifecycle_lifecycle-common-java8 \
davidlnb490d0e2018-09-28 10:01:05 -070097 androidx.lifecycle_lifecycle-extensions \
davidlna68ce7e2018-09-24 09:44:04 -070098 androidx.preference_preference \
davidln72e170a2018-10-01 14:46:51 -070099 androidx-constraintlayout_constraintlayout \
davidlnf1494d82019-03-08 16:35:55 -0800100 car-apps-common \
davidlna68ce7e2018-09-24 09:44:04 -0700101 car-settings-lib \
kevinjm2c74aa72019-04-10 12:48:15 -0700102 car-setup-wizard-lib-utils \
davidlna68ce7e2018-09-24 09:44:04 -0700103 SettingsLib
104
105 LOCAL_RESOURCE_DIR := \
106 $(LOCAL_PATH)/res \
Priyank Singh240b0932019-05-22 18:12:41 -0700107 $(LOCAL_PATH)/tests/robotests/res \
108 $(LOCAL_PATH)/../libs/car-apps-common/res \
109 $(LOCAL_PATH)/../libs/car-settings-lib/res \
110 $(LOCAL_PATH)/../../../../frameworks/base/packages/SettingsLib/res
davidlna68ce7e2018-09-24 09:44:04 -0700111
112 LOCAL_CERTIFICATE := platform
113
114 LOCAL_MODULE_TAGS := optional
115
116 LOCAL_PROGUARD_ENABLED := disabled
117
118 LOCAL_PRIVILEGED_MODULE := true
119
120 LOCAL_DEX_PREOPT := false
121
davidlnb490d0e2018-09-28 10:01:05 -0700122 LOCAL_STATIC_JAVA_LIBRARIES := \
Ying Zheng5b2ef4c2018-11-01 10:54:58 -0700123 android.car.userlib \
davidln72e170a2018-10-01 14:46:51 -0700124 androidx-constraintlayout_constraintlayout-solver \
davidlnb490d0e2018-09-28 10:01:05 -0700125 jsr305
davidlna68ce7e2018-09-24 09:44:04 -0700126
127 LOCAL_DX_FLAGS := --multi-dex
128
davidlna68ce7e2018-09-24 09:44:04 -0700129 include $(BUILD_PACKAGE)
130endif
131###################################################################################
132
roger xue843fbc42017-02-22 16:20:08 -0800133# Use the following include to make our test apk.
134ifeq (,$(ONE_SHOT_MAKEFILE))
James Lemieux36aeaf32017-12-14 16:08:04 -0800135include $(call first-makefiles-under, $(LOCAL_PATH))
roger xue843fbc42017-02-22 16:20:08 -0800136endif
137
Bryan Eyler3f553712017-06-21 17:30:21 -0700138endif