1#
2# Copyright (C) 2016 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#      http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
17#
18# Include this file to utilize the car-stream-ui-lib's resources and files.
19#
20# Make sure to include it after you've set all your desired LOCAL variables.
21# Note that you must explicitly set your LOCAL_RESOURCE_DIR before including this file.
22#
23# For example:
24#
25#   LOCAL_RESOURCE_DIR := \
26#        $(LOCAL_PATH)/res
27#
28#   include packages/apps/Car/libs/car-apps-common/car-apps-common
29#
30
31# Check that LOCAL_RESOURCE_DIR is defined
32ifeq (,$(LOCAL_RESOURCE_DIR))
33$(error LOCAL_RESOURCE_DIR must be defined)
34endif
35
36# Include android-support-v4, if not already included
37ifeq (,$(findstring android-support-v4,$(LOCAL_STATIC_JAVA_LIBRARIES)))
38LOCAL_STATIC_JAVA_LIBRARIES += android-support-v4
39endif
40
41# Include android-support-annotations, if not already included
42ifeq (,$(findstring android-support-annotations,$(LOCAL_STATIC_JAVA_LIBRARIES)))
43LOCAL_STATIC_JAVA_LIBRARIES += android-support-annotations
44endif
45
46# Include car-apps-common
47ifeq (,$(findstring com.android.car.apps.common, $(LOCAL_STATIC_JAVA_LIBRARIES)))
48LOCAL_RESOURCE_DIR += \
49    packages/apps/Car/libs/car-apps-common/res
50LOCAL_AAPT_FLAGS += --extra-packages com.android.car.apps.common
51LOCAL_STATIC_JAVA_LIBRARIES += car-apps-common
52endif
53