1# Copyright (C) 2017 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#      http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15LOCAL_PATH := $(call my-dir)
16
17all_system_api_modules :=
18$(foreach ver,$(PLATFORM_SYSTEMSDK_VERSIONS),\
19  $(if $(call math_is_number,$(ver)),\
20    $(eval all_system_api_modules += system-$(ver).api)\
21  )\
22)
23all_system_api_files := $(addprefix $(COMPATIBILITY_TESTCASES_OUT_cts)/,$(all_system_api_modules))
24
25include $(CLEAR_VARS)
26LOCAL_MODULE := cts-system-all.api
27LOCAL_MODULE_STEM := system-all.api.zip
28LOCAL_MODULE_CLASS := ETC
29LOCAL_MODULE_PATH = $(TARGET_OUT_DATA_ETC)
30LOCAL_COMPATIBILITY_SUITE := arcts cts vts10 general-tests
31include $(BUILD_SYSTEM)/base_rules.mk
32$(LOCAL_BUILT_MODULE): $(SOONG_ZIP)
33$(LOCAL_BUILT_MODULE): PRIVATE_SYSTEM_API_FILES := $(all_system_api_files)
34$(LOCAL_BUILT_MODULE): $(all_system_api_files)
35	@echo "Zip API files $^ -> $@"
36	@mkdir -p $(dir $@)
37	$(hide) rm -f $@
38	$(hide) $(SOONG_ZIP) -o $@ -P out -C $(OUT_DIR) $(addprefix -f ,$(PRIVATE_SYSTEM_API_FILES))
39
40all_system_api_zip_file := $(LOCAL_BUILT_MODULE)
41
42include $(CLEAR_VARS)
43
44LOCAL_PACKAGE_NAME := CtsSystemApiSignatureTestCases
45
46LOCAL_JAVA_RESOURCE_FILES := $(all_system_api_zip_file)
47
48LOCAL_SIGNATURE_API_FILES := \
49    current.api.gz \
50    android-test-mock-current.api.gz \
51    android-test-runner-current.api.gz \
52    system-current.api.gz \
53    system-removed.api.gz \
54
55include $(LOCAL_PATH)/../build_signature_apk.mk
56
57all_system_api_files :=
58all_system_api_modules :=
59all_system_api_zip_file :=
60