blob: b8ce5bf4a5d3be7270e8b7df9218a2baa9d85d06 [file] [log] [blame]
Duy Truong5987bd82022-08-26 13:47:55 -07001# Copyright (C) 2022 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
15ifneq ($(wildcard test/sts/README-sts-sdk.md),)
Chris Dombroski1b569e42024-04-17 00:24:35 +000016test_suite_name := sts-sdk
Duy Truong5987bd82022-08-26 13:47:55 -070017test_suite_tradefed := sts-tradefed
18test_suite_readme := test/sts/README-sts-sdk.md
19sts_sdk_zip := $(HOST_OUT)/$(test_suite_name)/sts-sdk.zip
20
21include $(BUILD_SYSTEM)/tasks/tools/compatibility.mk
22
Chris Dombroski1b569e42024-04-17 00:24:35 +000023sts_sdk_plugin_skel := $(call intermediates-dir-for,ETC,sts-sdk-plugin-skel.zip)/sts-sdk-plugin-skel.zip
Duy Truong5987bd82022-08-26 13:47:55 -070024
Chris Dombroski1b569e42024-04-17 00:24:35 +000025$(sts_sdk_zip): STS_SDK_ZIP := $(compatibility_zip)
26$(sts_sdk_zip): STS_SDK_PLUGIN_SKEL := $(sts_sdk_plugin_skel)
27$(sts_sdk_zip): $(MERGE_ZIPS) $(ZIP2ZIP) $(compatibility_zip) $(sts_sdk_plugin_skel)
28 rm -f $@ $(STS_SDK_ZIP)_filtered
29 $(ZIP2ZIP) -i $(STS_SDK_ZIP) -o $(STS_SDK_ZIP)_filtered \
30 -x android-sts-sdk/tools/sts-tradefed-tests.jar \
31 'android-sts-sdk/tools/*:plugin/src/main/resources/sts-tradefed-tools/' \
32 'android-sts-sdk/jdk/**/*:plugin/src/main/resources/jdk/'
33 $(MERGE_ZIPS) $@ $(STS_SDK_ZIP)_filtered $(STS_SDK_PLUGIN_SKEL)
34 rm -f $(STS_SDK_ZIP)_filtered
Duy Truong5987bd82022-08-26 13:47:55 -070035
36.PHONY: sts-sdk
37sts-sdk: $(sts_sdk_zip)
38$(call dist-for-goals, sts-sdk, $(sts_sdk_zip))
39
40endif