blob: 745dc6de04a2259125874461debf960029d2b32b [file] [log] [blame]
Ying Wangb335bb02011-11-29 10:23:55 -08001#
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
17LOCAL_PATH:= $(call my-dir)
Ying Wangc7036822015-04-16 11:54:37 -070018
Yohann Roussel855a9502016-08-19 18:58:57 +020019# $(1): tested value
20define is_number
21$(shell if [[ $(1) =~ ^[0-9]+$$ ]] ; then echo true ; fi)
22endef
23
24# $(1): sdk version
25define declare_sdk_prebuilts
26
Ying Wangb335bb02011-11-29 10:23:55 -080027include $(CLEAR_VARS)
Yohann Roussel855a9502016-08-19 18:58:57 +020028LOCAL_MODULE := sdk_v$(1)
29LOCAL_SRC_FILES := $(1)/android.jar
30LOCAL_MODULE_CLASS := JAVA_LIBRARIES
31LOCAL_MODULE_SUFFIX := $(COMMON_JAVA_PACKAGE_SUFFIX)
32LOCAL_BUILT_MODULE_STEM := sdk_v$(1)$(COMMON_JAVA_PACKAGE_SUFFIX)
33LOCAL_MIN_SDK_VERSION := $(if $(call is_number,$(strip $(1))),$(1),$(PLATFORM_JACK_MIN_SDK_VERSION))
34LOCAL_UNINSTALLABLE_MODULE := true
35include $(BUILD_PREBUILT)
Ying Wangb335bb02011-11-29 10:23:55 -080036
Yohann Roussel855a9502016-08-19 18:58:57 +020037include $(CLEAR_VARS)
38LOCAL_MODULE := uiautomator_sdk_v$(1)
39LOCAL_SRC_FILES := $(1)/uiautomator.jar
40LOCAL_MODULE_CLASS := JAVA_LIBRARIES
41LOCAL_MODULE_SUFFIX := $(COMMON_JAVA_PACKAGE_SUFFIX)
42LOCAL_BUILT_MODULE_STEM := uiautomator_sdk_v$(1)$(COMMON_JAVA_PACKAGE_SUFFIX)
43LOCAL_MIN_SDK_VERSION := $(if $(call is_number,$(strip $(1))),$(1),$(PLATFORM_JACK_MIN_SDK_VERSION))
44LOCAL_UNINSTALLABLE_MODULE := true
45include $(BUILD_PREBUILT)
Ying Wangb335bb02011-11-29 10:23:55 -080046
Yohann Roussel855a9502016-08-19 18:58:57 +020047endef
48
49$(foreach s,$(TARGET_AVAILABLE_SDK_VERSIONS),\
50 $(eval $(call declare_sdk_prebuilts,$(s))))
Ying Wang2a38d242014-04-25 14:49:31 -070051
Ying Wangb335bb02011-11-29 10:23:55 -080052include $(call all-makefiles-under,$(LOCAL_PATH))