blob: c37915bc34ba32e0d4fb3becfa18cb5c152af83c [file] [log] [blame]
Jiyong Park49d695e2018-02-01 22:49:17 +09001# 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
Paul Duffina4503872019-05-31 10:41:41 +010017all_system_api_modules :=
Jiyong Park49d695e2018-02-01 22:49:17 +090018$(foreach ver,$(PLATFORM_SYSTEMSDK_VERSIONS),\
19 $(if $(call math_is_number,$(ver)),\
Svet Ganovfbd42872020-04-02 23:29:15 -070020 $(if $(wildcard prebuilts/sdk/$(ver)/system/api/android.txt),\
Makoto Onukif1892602020-06-01 09:35:10 -070021 $(eval all_system_api_modules += system-$(ver).api)\
Svet Ganovfbd42872020-04-02 23:29:15 -070022 )\
Jiyong Park49d695e2018-02-01 22:49:17 +090023 )\
24)
Colin Cross1baf88e2019-04-29 12:38:30 -070025all_system_api_files := $(addprefix $(COMPATIBILITY_TESTCASES_OUT_cts)/,$(all_system_api_modules))
Jiyong Park49d695e2018-02-01 22:49:17 +090026
27include $(CLEAR_VARS)
Makoto Onukif1892602020-06-01 09:35:10 -070028LOCAL_MODULE := cts-system-all.api
29LOCAL_MODULE_STEM := system-all.api.zip
Jiyong Park49d695e2018-02-01 22:49:17 +090030LOCAL_MODULE_CLASS := ETC
31LOCAL_MODULE_PATH = $(TARGET_OUT_DATA_ETC)
Dan Shi53ee9e42020-10-06 15:05:18 -070032LOCAL_COMPATIBILITY_SUITE := arcts cts general-tests
Jiyong Park49d695e2018-02-01 22:49:17 +090033include $(BUILD_SYSTEM)/base_rules.mk
Colin Cross1baf88e2019-04-29 12:38:30 -070034$(LOCAL_BUILT_MODULE): $(SOONG_ZIP)
35$(LOCAL_BUILT_MODULE): PRIVATE_SYSTEM_API_FILES := $(all_system_api_files)
36$(LOCAL_BUILT_MODULE): $(all_system_api_files)
Jiyong Park49d695e2018-02-01 22:49:17 +090037 @echo "Zip API files $^ -> $@"
38 @mkdir -p $(dir $@)
39 $(hide) rm -f $@
Sasha Smundakf70127e2019-05-13 17:36:01 -070040 $(hide) $(SOONG_ZIP) -o $@ -P out -C $(OUT_DIR) $(addprefix -f ,$(PRIVATE_SYSTEM_API_FILES))
Jiyong Park49d695e2018-02-01 22:49:17 +090041
Paul Duffina4503872019-05-31 10:41:41 +010042all_system_api_zip_file := $(LOCAL_BUILT_MODULE)
43
Jiyong Park49d695e2018-02-01 22:49:17 +090044include $(CLEAR_VARS)
45
46LOCAL_PACKAGE_NAME := CtsSystemApiSignatureTestCases
47
Paul Duffina4503872019-05-31 10:41:41 +010048LOCAL_JAVA_RESOURCE_FILES := $(all_system_api_zip_file)
49
Jiyong Park49d695e2018-02-01 22:49:17 +090050LOCAL_SIGNATURE_API_FILES := \
Makoto Onukif1892602020-06-01 09:35:10 -070051 current.api.gz \
52 android-test-mock-current.api.gz \
53 android-test-runner-current.api.gz \
54 system-current.api.gz \
55 system-removed.api.gz \
Jiyong Park49d695e2018-02-01 22:49:17 +090056
57include $(LOCAL_PATH)/../build_signature_apk.mk
58
59all_system_api_files :=
Colin Cross1baf88e2019-04-29 12:38:30 -070060all_system_api_modules :=
Paul Duffina4503872019-05-31 10:41:41 +010061all_system_api_zip_file :=