blob: 745dc6de04a2259125874461debf960029d2b32b [file] [log] [blame]
#
# Copyright (C) 2010 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
LOCAL_PATH:= $(call my-dir)
# $(1): tested value
define is_number
$(shell if [[ $(1) =~ ^[0-9]+$$ ]] ; then echo true ; fi)
endef
# $(1): sdk version
define declare_sdk_prebuilts
include $(CLEAR_VARS)
LOCAL_MODULE := sdk_v$(1)
LOCAL_SRC_FILES := $(1)/android.jar
LOCAL_MODULE_CLASS := JAVA_LIBRARIES
LOCAL_MODULE_SUFFIX := $(COMMON_JAVA_PACKAGE_SUFFIX)
LOCAL_BUILT_MODULE_STEM := sdk_v$(1)$(COMMON_JAVA_PACKAGE_SUFFIX)
LOCAL_MIN_SDK_VERSION := $(if $(call is_number,$(strip $(1))),$(1),$(PLATFORM_JACK_MIN_SDK_VERSION))
LOCAL_UNINSTALLABLE_MODULE := true
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := uiautomator_sdk_v$(1)
LOCAL_SRC_FILES := $(1)/uiautomator.jar
LOCAL_MODULE_CLASS := JAVA_LIBRARIES
LOCAL_MODULE_SUFFIX := $(COMMON_JAVA_PACKAGE_SUFFIX)
LOCAL_BUILT_MODULE_STEM := uiautomator_sdk_v$(1)$(COMMON_JAVA_PACKAGE_SUFFIX)
LOCAL_MIN_SDK_VERSION := $(if $(call is_number,$(strip $(1))),$(1),$(PLATFORM_JACK_MIN_SDK_VERSION))
LOCAL_UNINSTALLABLE_MODULE := true
include $(BUILD_PREBUILT)
endef
$(foreach s,$(TARGET_AVAILABLE_SDK_VERSIONS),\
$(eval $(call declare_sdk_prebuilts,$(s))))
include $(call all-makefiles-under,$(LOCAL_PATH))