1 # 2 # Copyright (C) 2010 The Android Open Source Project 3 # 4 # Licensed under the Apache License, Version 2.0 (the "License"); 5 # you may not use this file except in compliance with the License. 6 # You may obtain a copy of the License at 7 # 8 # http://www.apache.org/licenses/LICENSE-2.0 9 # 10 # Unless required by applicable law or agreed to in writing, software 11 # distributed under the License is distributed on an "AS IS" BASIS, 12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 # See the License for the specific language governing permissions and 14 # limitations under the License. 15 # 16 17 LOCAL_PATH:= $(call my-dir) 18 19 # $(1): sdk version 20 define declare_sdk_prebuilts 21 22 include $(CLEAR_VARS) 23 LOCAL_MODULE := sdk_v$(1) 24 LOCAL_SRC_FILES := $(1)/android.jar 25 LOCAL_MODULE_CLASS := JAVA_LIBRARIES 26 LOCAL_MODULE_SUFFIX := $(COMMON_JAVA_PACKAGE_SUFFIX) 27 LOCAL_BUILT_MODULE_STEM := sdk_v$(1)$(COMMON_JAVA_PACKAGE_SUFFIX) 28 LOCAL_MIN_SDK_VERSION := $(if $(call math_is_number,$(strip $(1))),$(1),$(PLATFORM_JACK_MIN_SDK_VERSION)) 29 LOCAL_UNINSTALLABLE_MODULE := true 30 include $(BUILD_PREBUILT) 31 32 ifneq (,$(wildcard $(LOCAL_PATH)/$(1)/uiautomator.jar)) 33 include $(CLEAR_VARS) 34 LOCAL_MODULE := uiautomator_sdk_v$(1) 35 LOCAL_SRC_FILES := $(1)/uiautomator.jar 36 LOCAL_MODULE_CLASS := JAVA_LIBRARIES 37 LOCAL_MODULE_SUFFIX := $(COMMON_JAVA_PACKAGE_SUFFIX) 38 LOCAL_BUILT_MODULE_STEM := uiautomator_sdk_v$(1)$(COMMON_JAVA_PACKAGE_SUFFIX) 39 LOCAL_MIN_SDK_VERSION := $(if $(call math_is_number,$(strip $(1))),$(1),$(PLATFORM_JACK_MIN_SDK_VERSION)) 40 LOCAL_UNINSTALLABLE_MODULE := true 41 include $(BUILD_PREBUILT) 42 endif 43 44 endef 45 46 $(foreach s,$(filter-out test_current,$(TARGET_AVAILABLE_SDK_VERSIONS)),\ 47 $(eval $(call declare_sdk_prebuilts,$(s)))) 48 49 include $(call all-makefiles-under,$(LOCAL_PATH)) 50