blob: 8ca40429ede4d034655d49c4cdc7acd7e456ef98 [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): sdk version
20define declare_sdk_prebuilts
21
Ying Wangb335bb02011-11-29 10:23:55 -080022include $(CLEAR_VARS)
Yohann Roussel855a9502016-08-19 18:58:57 +020023LOCAL_MODULE := sdk_v$(1)
24LOCAL_SRC_FILES := $(1)/android.jar
25LOCAL_MODULE_CLASS := JAVA_LIBRARIES
26LOCAL_MODULE_SUFFIX := $(COMMON_JAVA_PACKAGE_SUFFIX)
27LOCAL_BUILT_MODULE_STEM := sdk_v$(1)$(COMMON_JAVA_PACKAGE_SUFFIX)
Dan Willemsene383f132016-09-30 18:41:21 -070028LOCAL_MIN_SDK_VERSION := $(if $(call math_is_number,$(strip $(1))),$(1),$(PLATFORM_JACK_MIN_SDK_VERSION))
Yohann Roussel855a9502016-08-19 18:58:57 +020029LOCAL_UNINSTALLABLE_MODULE := true
30include $(BUILD_PREBUILT)
Ying Wangb335bb02011-11-29 10:23:55 -080031
Colin Cross449c3182016-10-21 10:35:17 -070032ifneq (,$(wildcard $(LOCAL_PATH)/$(1)/uiautomator.jar))
Yohann Roussel855a9502016-08-19 18:58:57 +020033include $(CLEAR_VARS)
34LOCAL_MODULE := uiautomator_sdk_v$(1)
35LOCAL_SRC_FILES := $(1)/uiautomator.jar
36LOCAL_MODULE_CLASS := JAVA_LIBRARIES
37LOCAL_MODULE_SUFFIX := $(COMMON_JAVA_PACKAGE_SUFFIX)
38LOCAL_BUILT_MODULE_STEM := uiautomator_sdk_v$(1)$(COMMON_JAVA_PACKAGE_SUFFIX)
Dan Willemsene383f132016-09-30 18:41:21 -070039LOCAL_MIN_SDK_VERSION := $(if $(call math_is_number,$(strip $(1))),$(1),$(PLATFORM_JACK_MIN_SDK_VERSION))
Yohann Roussel855a9502016-08-19 18:58:57 +020040LOCAL_UNINSTALLABLE_MODULE := true
41include $(BUILD_PREBUILT)
Colin Cross449c3182016-10-21 10:35:17 -070042endif
Ying Wangb335bb02011-11-29 10:23:55 -080043
Yohann Roussel855a9502016-08-19 18:58:57 +020044endef
45
Colin Cross449c3182016-10-21 10:35:17 -070046$(foreach s,$(filter-out test_current,$(TARGET_AVAILABLE_SDK_VERSIONS)),\
Yohann Roussel855a9502016-08-19 18:58:57 +020047 $(eval $(call declare_sdk_prebuilts,$(s))))
Ying Wang2a38d242014-04-25 14:49:31 -070048
Ying Wangb335bb02011-11-29 10:23:55 -080049include $(call all-makefiles-under,$(LOCAL_PATH))