From d1799f6835ea9cbed255050d29e78f97cdcc02a4 Mon Sep 17 00:00:00 2001 From: Jihoon Kang Date: Tue, 20 Feb 2024 23:01:38 +0000 Subject: [PATCH] Modify sdk_library to dist exportable api files by default Currently, the "exportable" stubs are copied to the dist directory by default when building the java_sdk_library module. However, "everything" api files (current & removed) are copied to the dist directory, causing confusion to the developers. This change modifies the default behavior so that the "exportable" api files are copied to the dist directory and match the behavior of the stubs. Test: m nothing Bug: 325639165 Change-Id: I2e3b158bb638d30629120b32aa3e88bb26231020 --- java/sdk_library.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/java/sdk_library.go b/java/sdk_library.go index 2e4f2e349..d532aaa00 100644 --- a/java/sdk_library.go +++ b/java/sdk_library.go @@ -1997,8 +1997,10 @@ func (module *SdkLibrary) createStubsSourcesAndApi(mctx android.DefaultableHookC tag string pattern string }{ - {tag: ".api.txt", pattern: "%s.txt"}, - {tag: ".removed-api.txt", pattern: "%s-removed.txt"}, + // "exportable" api files are copied to the dist directory instead of the + // "everything" api files. + {tag: ".exportable.api.txt", pattern: "%s.txt"}, + {tag: ".exportable.removed-api.txt", pattern: "%s-removed.txt"}, } { props.Dists = append(props.Dists, android.Dist{ Targets: []string{"sdk", "win_sdk"},