1 # Copyright (C) 2016 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 15 ################################################################### 16 # FrameworksServicesLib app just for Robolectric test target # 17 ################################################################### 18 LOCAL_PATH := $(call my-dir) 19 20 include $(CLEAR_VARS) 21 22 LOCAL_PACKAGE_NAME := FrameworksServicesLib 23 LOCAL_PRIVATE_PLATFORM_APIS := true 24 LOCAL_MODULE_TAGS := optional 25 26 LOCAL_PRIVILEGED_MODULE := true 27 28 LOCAL_STATIC_JAVA_LIBRARIES := \ 29 services.core \ 30 services.net 31 32 include $(BUILD_PACKAGE) 33 34 ################################################################### 35 # FrameworksServicesLib Robolectric test target. # 36 ################################################################### 37 include $(CLEAR_VARS) 38 39 LOCAL_MODULE := FrameworksServicesRoboTests 40 41 LOCAL_SRC_FILES := $(call all-java-files-under, src) 42 43 LOCAL_RESOURCE_DIR := \ 44 $(LOCAL_PATH)/res 45 46 LOCAL_JAVA_RESOURCE_DIRS := config 47 48 # Include the testing libraries 49 LOCAL_JAVA_LIBRARIES := \ 50 platform-test-annotations \ 51 robolectric_android-all-stub \ 52 Robolectric_all-target \ 53 mockito-robolectric-prebuilt \ 54 truth-prebuilt \ 55 testng 56 57 LOCAL_INSTRUMENTATION_FOR := FrameworksServicesLib 58 59 LOCAL_MODULE_TAGS := optional 60 61 include $(BUILD_STATIC_JAVA_LIBRARY) 62 63 ################################################################### 64 # FrameworksServicesLib runner target to run the previous target. # 65 ################################################################### 66 include $(CLEAR_VARS) 67 68 LOCAL_MODULE := RunFrameworksServicesRoboTests 69 70 LOCAL_JAVA_LIBRARIES := \ 71 FrameworksServicesRoboTests \ 72 platform-test-annotations \ 73 robolectric_android-all-stub \ 74 Robolectric_all-target \ 75 mockito-robolectric-prebuilt \ 76 truth-prebuilt \ 77 testng 78 79 LOCAL_TEST_PACKAGE := FrameworksServicesLib 80 81 LOCAL_ROBOTEST_FILES := $(call find-files-in-subdirs,$(LOCAL_PATH)/src,*Test.java,.) 82 83 include external/robolectric-shadows/run_robotests.mk 84 85 ################################################################### 86 # include subdir Android.mk files 87 ################################################################### 88 include $(CLEAR_VARS) 89 include $(call all-makefiles-under,$(LOCAL_PATH)) 90