• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
18LOCAL_JAVA_LIBRARIES := android.car
19
20LOCAL_STATIC_ANDROID_LIBRARIES += car-setup-wizard-lib
21
22include $(BUILD_PACKAGE)
23
24###############################################################
25# CarSetupWizardLib Robolectric test target.                  #
26###############################################################
27include $(CLEAR_VARS)
28
29LOCAL_MODULE := CarSetupWizardLibRoboTests
30LOCAL_MODULE_CLASS := JAVA_LIBRARIES
31
32LOCAL_SRC_FILES := $(call all-java-files-under, src)
33
34LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
35
36LOCAL_JAVA_RESOURCE_DIRS := config
37
38LOCAL_JAVA_LIBRARIES := \
39    android.car \
40    robolectric_android-all-stub \
41    Robolectric_all-target \
42    mockito-robolectric-prebuilt \
43    truth-prebuilt
44
45LOCAL_INSTRUMENTATION_FOR := CarSetupWizardLib
46
47LOCAL_MODULE_TAGS := optional
48
49# Generate test_config.properties
50include external/robolectric-shadows/gen_test_config.mk
51
52include $(BUILD_STATIC_JAVA_LIBRARY)
53
54###############################################################
55# CarSetupWizardLib runner target to run the previous target. #
56###############################################################
57include $(CLEAR_VARS)
58LOCAL_MODULE := RunCarSetupWizardLibRoboTests
59
60LOCAL_JAVA_LIBRARIES := \
61    android.car \
62    CarSetupWizardLibRoboTests \
63    robolectric_android-all-stub \
64    Robolectric_all-target \
65    mockito-robolectric-prebuilt \
66    truth-prebuilt
67
68LOCAL_TEST_PACKAGE := CarSetupWizardLib
69
70LOCAL_ROBOTEST_FILES := $(filter-out %/BaseRobolectricTest.java,\
71    $(call find-files-in-subdirs,$(LOCAL_PATH)/src,*Test.java,.))
72
73LOCAL_INSTRUMENT_SOURCE_DIRS := $(dir $(LOCAL_PATH))../src
74
75include external/robolectric-shadows/run_robotests.mk
76