blob: 4a8c42c15166e51466a33993c433473dd6657451 [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
Jiyong Park1df92df2018-03-07 23:36:18 +090030LOCAL_SDK_VERSION := current
Yohann Roussel855a9502016-08-19 18:58:57 +020031include $(BUILD_PREBUILT)
Ying Wangb335bb02011-11-29 10:23:55 -080032
Colin Cross449c3182016-10-21 10:35:17 -070033ifneq (,$(wildcard $(LOCAL_PATH)/$(1)/uiautomator.jar))
Yohann Roussel855a9502016-08-19 18:58:57 +020034include $(CLEAR_VARS)
35LOCAL_MODULE := uiautomator_sdk_v$(1)
36LOCAL_SRC_FILES := $(1)/uiautomator.jar
37LOCAL_MODULE_CLASS := JAVA_LIBRARIES
38LOCAL_MODULE_SUFFIX := $(COMMON_JAVA_PACKAGE_SUFFIX)
39LOCAL_BUILT_MODULE_STEM := uiautomator_sdk_v$(1)$(COMMON_JAVA_PACKAGE_SUFFIX)
Dan Willemsene383f132016-09-30 18:41:21 -070040LOCAL_MIN_SDK_VERSION := $(if $(call math_is_number,$(strip $(1))),$(1),$(PLATFORM_JACK_MIN_SDK_VERSION))
Yohann Roussel855a9502016-08-19 18:58:57 +020041LOCAL_UNINSTALLABLE_MODULE := true
Jiyong Park9b1ddff2018-01-15 19:34:10 +090042LOCAL_SDK_VERSION := $(1)
Yohann Roussel855a9502016-08-19 18:58:57 +020043include $(BUILD_PREBUILT)
Colin Cross449c3182016-10-21 10:35:17 -070044endif
Ying Wangb335bb02011-11-29 10:23:55 -080045
Yohann Roussel855a9502016-08-19 18:58:57 +020046endef
47
Jiyong Parkb773d292018-01-30 23:33:19 +090048$(foreach s,$(filter-out test_current core_current,$(TARGET_AVAILABLE_SDK_VERSIONS)),\
Yohann Roussel855a9502016-08-19 18:58:57 +020049 $(eval $(call declare_sdk_prebuilts,$(s))))
Ying Wang2a38d242014-04-25 14:49:31 -070050
Ying Wangb335bb02011-11-29 10:23:55 -080051include $(call all-makefiles-under,$(LOCAL_PATH))