Jiyong Park | 49d695e | 2018-02-01 22:49:17 +0900 | [diff] [blame] | 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 | |
| 15 | LOCAL_PATH := $(call my-dir) |
| 16 | |
Paul Duffin | a450387 | 2019-05-31 10:41:41 +0100 | [diff] [blame] | 17 | all_system_api_modules := |
Jiyong Park | 49d695e | 2018-02-01 22:49:17 +0900 | [diff] [blame] | 18 | $(foreach ver,$(PLATFORM_SYSTEMSDK_VERSIONS),\ |
| 19 | $(if $(call math_is_number,$(ver)),\ |
Svet Ganov | fbd4287 | 2020-04-02 23:29:15 -0700 | [diff] [blame] | 20 | $(if $(wildcard prebuilts/sdk/$(ver)/system/api/android.txt),\ |
Makoto Onuki | f189260 | 2020-06-01 09:35:10 -0700 | [diff] [blame] | 21 | $(eval all_system_api_modules += system-$(ver).api)\ |
Svet Ganov | fbd4287 | 2020-04-02 23:29:15 -0700 | [diff] [blame] | 22 | )\ |
Jiyong Park | 49d695e | 2018-02-01 22:49:17 +0900 | [diff] [blame] | 23 | )\ |
| 24 | ) |
Colin Cross | 1baf88e | 2019-04-29 12:38:30 -0700 | [diff] [blame] | 25 | all_system_api_files := $(addprefix $(COMPATIBILITY_TESTCASES_OUT_cts)/,$(all_system_api_modules)) |
Jiyong Park | 49d695e | 2018-02-01 22:49:17 +0900 | [diff] [blame] | 26 | |
| 27 | include $(CLEAR_VARS) |
Makoto Onuki | f189260 | 2020-06-01 09:35:10 -0700 | [diff] [blame] | 28 | LOCAL_MODULE := cts-system-all.api |
| 29 | LOCAL_MODULE_STEM := system-all.api.zip |
Jiyong Park | 49d695e | 2018-02-01 22:49:17 +0900 | [diff] [blame] | 30 | LOCAL_MODULE_CLASS := ETC |
| 31 | LOCAL_MODULE_PATH = $(TARGET_OUT_DATA_ETC) |
Dan Shi | 53ee9e4 | 2020-10-06 15:05:18 -0700 | [diff] [blame] | 32 | LOCAL_COMPATIBILITY_SUITE := arcts cts general-tests |
Jiyong Park | 49d695e | 2018-02-01 22:49:17 +0900 | [diff] [blame] | 33 | include $(BUILD_SYSTEM)/base_rules.mk |
Colin Cross | 1baf88e | 2019-04-29 12:38:30 -0700 | [diff] [blame] | 34 | $(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 Park | 49d695e | 2018-02-01 22:49:17 +0900 | [diff] [blame] | 37 | @echo "Zip API files $^ -> $@" |
| 38 | @mkdir -p $(dir $@) |
| 39 | $(hide) rm -f $@ |
Sasha Smundak | f70127e | 2019-05-13 17:36:01 -0700 | [diff] [blame] | 40 | $(hide) $(SOONG_ZIP) -o $@ -P out -C $(OUT_DIR) $(addprefix -f ,$(PRIVATE_SYSTEM_API_FILES)) |
Jiyong Park | 49d695e | 2018-02-01 22:49:17 +0900 | [diff] [blame] | 41 | |
Paul Duffin | a450387 | 2019-05-31 10:41:41 +0100 | [diff] [blame] | 42 | all_system_api_zip_file := $(LOCAL_BUILT_MODULE) |
| 43 | |
Jiyong Park | 49d695e | 2018-02-01 22:49:17 +0900 | [diff] [blame] | 44 | include $(CLEAR_VARS) |
| 45 | |
| 46 | LOCAL_PACKAGE_NAME := CtsSystemApiSignatureTestCases |
| 47 | |
Paul Duffin | a450387 | 2019-05-31 10:41:41 +0100 | [diff] [blame] | 48 | LOCAL_JAVA_RESOURCE_FILES := $(all_system_api_zip_file) |
| 49 | |
Jiyong Park | 49d695e | 2018-02-01 22:49:17 +0900 | [diff] [blame] | 50 | LOCAL_SIGNATURE_API_FILES := \ |
Makoto Onuki | f189260 | 2020-06-01 09:35:10 -0700 | [diff] [blame] | 51 | 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 Park | 49d695e | 2018-02-01 22:49:17 +0900 | [diff] [blame] | 56 | |
| 57 | include $(LOCAL_PATH)/../build_signature_apk.mk |
| 58 | |
| 59 | all_system_api_files := |
Colin Cross | 1baf88e | 2019-04-29 12:38:30 -0700 | [diff] [blame] | 60 | all_system_api_modules := |
Paul Duffin | a450387 | 2019-05-31 10:41:41 +0100 | [diff] [blame] | 61 | all_system_api_zip_file := |