From 0216805aaeb7c6d51c0605dcdd8e811fee8f2a33 Mon Sep 17 00:00:00 2001 From: Jihoon Kang Date: Wed, 20 Mar 2024 00:44:54 +0000 Subject: Modify dist artifact dependency to respect the RELEASE_HIDDEN_API_EXPORTABLE_STUBS build flag Currently, the "exportable" stubs and the api files are copied to the dist directory during SDK builds regardless of the value of the RELEASE_HIDDEN_API_EXPORTABLE_STUBS build flag. This change modifies such behavior that the "exportable" artifacts are copied to the dist directory only when the RELEASE_HIDDEN_API_EXPORTABLE_STUBS flag value is set to true. Test: lunch aosp_arm-trunk_staging-eng && m sdk dist and inspect ninja graph to verify that the "everything" artifacts are copied to the dist directory Bug: 330417789 Change-Id: I3b83375610eb172d7b9da7ea831a74cd427b696c --- java/sdk_library_test.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'java/sdk_library_test.go') diff --git a/java/sdk_library_test.go b/java/sdk_library_test.go index 93ef40872..b622f98d0 100644 --- a/java/sdk_library_test.go +++ b/java/sdk_library_test.go @@ -1393,6 +1393,11 @@ func TestJavaSdkLibraryDist(t *testing.T) { "sdklib_group_foo", "sdklib_owner_foo", "foo"), + android.FixtureModifyProductVariables(func(variables android.FixtureProductVariables) { + variables.BuildFlags = map[string]string{ + "RELEASE_HIDDEN_API_EXPORTABLE_STUBS": "true", + } + }), ).RunTestWithBp(t, ` java_sdk_library { name: "sdklib_no_group", -- cgit v1.2.3-59-g8ed1b