From 1938dba8b62a15b9a589e7aaf8ec5a120b7915fe Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Tue, 26 Jul 2022 23:53:00 +0000 Subject: Exclude unsupported libraries from sdk snapshot When an sdk snapshot is targeted at release X then it cannot include bootclasspath fragment libraries which are not present in that build as otherwise it causes build failures. It should also not include any unsupported libraries, i.e. libraries that cannot work on that release. This change causes sdk snapshot to exclude libraries that have a min_sdk_version > target build release It also ensures that hidden API flags do not include any information from excluded libraries. Bug: 240406019 Test: BUILD_NUMBER=fixed packages/modules/common/build/mainline_modules_sdks.sh # Ran the previous command with and without this change to make # sure that this change excludes framework-connectivity-t library from the # tethering sdk snapshot for S, including from the hidden API flag files. Change-Id: I57969b85a12e9e5a3fc76c055b260cec5d5f7d7f --- sdk/java_sdk_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sdk/java_sdk_test.go') diff --git a/sdk/java_sdk_test.go b/sdk/java_sdk_test.go index 7ab5285c6..d59883435 100644 --- a/sdk/java_sdk_test.go +++ b/sdk/java_sdk_test.go @@ -1004,7 +1004,7 @@ func TestSnapshotWithJavaSdkLibrary_AnnotationsZip_PreT(t *testing.T) { java_sdk_library { name: "myjavalib", srcs: ["Test.java"], - sdk_version: "current", + sdk_version: "S", shared_library: false, annotations_enabled: true, public: { -- cgit v1.2.3-59-g8ed1b