From aaa6dcdabbf13b12fbe75add052bbd4a23d37ffd Mon Sep 17 00:00:00 2001 From: Jeongik Cha Date: Wed, 22 May 2024 00:41:28 +0900 Subject: [PATCH] implement InstallDepNeeded for sdkLibraryComponentTag To include a sdk library impl and a permission xml for that. Bug: 340365498 Test: m aosp_cf_system_x86_64 && check if there is a sdk lib impl and permission xml Change-Id: I10190fb9d398b6249efd6fe50b204e328250f23f --- java/sdk_library.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/java/sdk_library.go b/java/sdk_library.go index 677b32a5e..062a62f2c 100644 --- a/java/sdk_library.go +++ b/java/sdk_library.go @@ -1504,6 +1504,12 @@ func IsXmlPermissionsFileDepTag(depTag blueprint.DependencyTag) bool { var implLibraryTag = sdkLibraryComponentTag{name: "impl-library"} +var _ android.InstallNeededDependencyTag = sdkLibraryComponentTag{} + +func (t sdkLibraryComponentTag) InstallDepNeeded() bool { + return t.name == "xml-permissions-file" || t.name == "impl-library" +} + // Add the dependencies on the child modules in the component deps mutator. func (module *SdkLibrary) ComponentDepsMutator(ctx android.BottomUpMutatorContext) { for _, apiScope := range module.getGeneratedApiScopes(ctx) {