Yao Chen | e2de1d5 | 2015-11-09 13:50:26 -0800 | [diff] [blame] | 1 | # |
keunyoung | 24bfc0e | 2015-11-16 10:33:15 -0800 | [diff] [blame] | 2 | # Include this make file to build your application with car friendly UI. |
Yao Chen | e2de1d5 | 2015-11-09 13:50:26 -0800 | [diff] [blame] | 3 | # |
| 4 | # Make sure to include it after you've set all your desired LOCAL variables. |
| 5 | # Note that you must explicitly set your LOCAL_RESOURCE_DIR before including this file. |
| 6 | # |
| 7 | # For example: |
| 8 | # |
| 9 | # LOCAL_RESOURCE_DIR := \ |
| 10 | # $(LOCAL_PATH)/res |
| 11 | # |
Keun-young Park | e54ac27 | 2016-02-16 19:02:18 -0800 | [diff] [blame] | 12 | # include packages/services/Car/car-support-lib/car-support.mk |
Yao Chen | e2de1d5 | 2015-11-09 13:50:26 -0800 | [diff] [blame] | 13 | # |
| 14 | |
| 15 | # Check that LOCAL_RESOURCE_DIR is defined |
| 16 | ifeq (,$(LOCAL_RESOURCE_DIR)) |
| 17 | $(error LOCAL_RESOURCE_DIR must be defined) |
| 18 | endif |
| 19 | |
| 20 | # Add --auto-add-overlay flag if not present |
| 21 | ifeq (,$(findstring --auto-add-overlay, $(LOCAL_AAPT_FLAGS))) |
| 22 | LOCAL_AAPT_FLAGS += --auto-add-overlay |
| 23 | endif |
| 24 | |
| 25 | # Include car ui library, if not already included |
Yao Chen | 5d8b904 | 2016-04-13 11:56:15 -0700 | [diff] [blame] | 26 | ifeq (,$(findstring android.support.car, $(LOCAL_STATIC_JAVA_LIBRARIES))) |
Yao Chen | e2de1d5 | 2015-11-09 13:50:26 -0800 | [diff] [blame] | 27 | LOCAL_RESOURCE_DIR += \ |
Keun-young Park | e54ac27 | 2016-02-16 19:02:18 -0800 | [diff] [blame] | 28 | packages/services/Car/car-support-lib/res |
Yao Chen | e2de1d5 | 2015-11-09 13:50:26 -0800 | [diff] [blame] | 29 | LOCAL_AAPT_FLAGS += --extra-packages android.support.car.ui |
Keun-young Park | e54ac27 | 2016-02-16 19:02:18 -0800 | [diff] [blame] | 30 | LOCAL_STATIC_JAVA_LIBRARIES += android.support.car |
Yao Chen | e2de1d5 | 2015-11-09 13:50:26 -0800 | [diff] [blame] | 31 | endif |
| 32 | |
| 33 | ## Include transitive dependencies below |
| 34 | |
| 35 | # Include support-v7-appcompat, if not already included |
| 36 | ifeq (,$(findstring android-support-v7-appcompat,$(LOCAL_STATIC_JAVA_LIBRARIES))) |
| 37 | LOCAL_RESOURCE_DIR += frameworks/support/v7/appcompat/res |
| 38 | LOCAL_AAPT_FLAGS += --extra-packages android.support.v7.appcompat |
| 39 | LOCAL_STATIC_JAVA_LIBRARIES += android-support-v7-appcompat |
| 40 | endif |
| 41 | |
| 42 | # Include support-v7-recyclerview, if not already included |
| 43 | ifeq (,$(findstring android-support-v7-recyclerview,$(LOCAL_STATIC_JAVA_LIBRARIES))) |
| 44 | LOCAL_RESOURCE_DIR += frameworks/support/v7/recyclerview/res |
| 45 | LOCAL_AAPT_FLAGS += --extra-packages android.support.v7.recyclerview |
| 46 | LOCAL_STATIC_JAVA_LIBRARIES += android-support-v7-recyclerview |
| 47 | endif |
| 48 | |
| 49 | # Include support-v7-cardview, if not already included |
| 50 | ifeq (,$(findstring android-support-v7-cardview,$(LOCAL_STATIC_JAVA_LIBRARIES))) |
| 51 | LOCAL_RESOURCE_DIR += frameworks/support/v7/cardview/res |
| 52 | LOCAL_AAPT_FLAGS += --extra-packages android.support.v7.cardview |
| 53 | LOCAL_STATIC_JAVA_LIBRARIES += android-support-v7-cardview |
| 54 | endif |
Keun-young Park | e54ac27 | 2016-02-16 19:02:18 -0800 | [diff] [blame] | 55 | LOCAL_JAVA_LIBRARIES += android.car |
| 56 | |