1LOCAL_PATH := $(call my-dir)
2
3############################################################
4# CarSetupWizardLib app just for Robolectric test target.  #
5############################################################
6include $(CLEAR_VARS)
7
8LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
9
10LOCAL_PACKAGE_NAME := CarSetupWizardLib
11LOCAL_PRIVATE_PLATFORM_APIS := true
12LOCAL_MODULE_TAGS := optional
13
14LOCAL_USE_AAPT2 := true
15
16LOCAL_PRIVILEGED_MODULE := true
17
18include frameworks/opt/car/setupwizard/library/common.mk
19
20include $(BUILD_PACKAGE)
21
22#############################################
23# Car Setup Wizard Library Robolectric test target. #
24#############################################
25include $(CLEAR_VARS)
26
27LOCAL_MODULE := CarSetupWizardLibRoboTests
28
29LOCAL_SRC_FILES := $(call all-java-files-under, src)
30
31LOCAL_RESOURCE_DIR := \
32    $(LOCAL_PATH)/res
33
34LOCAL_JAVA_RESOURCE_DIRS := config
35
36# Include the testing libraries
37LOCAL_JAVA_LIBRARIES := \
38    robolectric_android-all-stub \
39    Robolectric_all-target \
40    mockito-robolectric-prebuilt \
41    truth-prebuilt
42
43LOCAL_INSTRUMENTATION_FOR := CarSetupWizardLib
44
45LOCAL_MODULE_TAGS := optional
46
47include $(BUILD_STATIC_JAVA_LIBRARY)
48
49#############################################################
50# Car Setup Wizard Library runner target to run the previous target. #
51#############################################################
52include $(CLEAR_VARS)
53LOCAL_MODULE := RunCarSetupWizardLibRoboTests
54
55LOCAL_JAVA_LIBRARIES := \
56    CarSetupWizardLibRoboTests \
57    robolectric_android-all-stub \
58    Robolectric_all-target \
59    mockito-robolectric-prebuilt \
60    truth-prebuilt
61
62LOCAL_TEST_PACKAGE := CarSetupWizardLib
63
64LOCAL_ROBOTEST_FILES := $(filter-out %/BaseRobolectricTest.java,\
65    $(call find-files-in-subdirs,$(LOCAL_PATH)/src,*Test.java,.))
66
67LOCAL_INSTRUMENT_SOURCE_DIRS := $(dir $(LOCAL_PATH))../src
68
69include external/robolectric-shadows/run_robotests.mk