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# SettingsLib Shell app just for Robolectric test target. # 17############################################################ 18LOCAL_PATH := $(call my-dir) 19include $(CLEAR_VARS) 20 21LOCAL_PACKAGE_NAME := SettingsLibShell 22LOCAL_PRIVATE_PLATFORM_APIS := true 23LOCAL_MODULE_TAGS := optional 24 25LOCAL_PRIVILEGED_MODULE := true 26 27LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res 28 29LOCAL_USE_AAPT2 := true 30 31include frameworks/base/packages/SettingsLib/common.mk 32 33include $(BUILD_PACKAGE) 34 35############################################# 36# SettingsLib Robolectric test target. # 37############################################# 38include $(CLEAR_VARS) 39 40LOCAL_MODULE := SettingsLibRoboTests 41 42LOCAL_SRC_FILES := $(call all-java-files-under, src) 43 44LOCAL_JAVA_RESOURCE_DIRS := config 45 46LOCAL_JAVA_LIBRARIES := \ 47 robolectric_android-all-stub \ 48 Robolectric_all-target \ 49 mockito-robolectric-prebuilt \ 50 truth-prebuilt 51 52LOCAL_INSTRUMENTATION_FOR := SettingsLibShell 53 54LOCAL_MODULE_TAGS := optional 55 56include $(BUILD_STATIC_JAVA_LIBRARY) 57 58############################################################# 59# SettingsLib runner target to run the previous target. # 60############################################################# 61include $(CLEAR_VARS) 62 63LOCAL_MODULE := RunSettingsLibRoboTests 64 65LOCAL_JAVA_LIBRARIES := \ 66 SettingsLibRoboTests \ 67 robolectric_android-all-stub \ 68 Robolectric_all-target \ 69 mockito-robolectric-prebuilt \ 70 truth-prebuilt 71 72LOCAL_TEST_PACKAGE := SettingsLibShell 73 74LOCAL_ROBOTEST_TIMEOUT := 36000 75 76include external/robolectric-shadows/run_robotests.mk