Merge changes I1ed3ab24,I68678ddf am: 2d704998f4 am: 9b9cda6b14 am: b05664f90c

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2513937

Change-Id: Ibc9e5b8bea86717c670ff8d22bb8bf9a814a9c23
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot
2023-03-31 17:08:05 +00:00
committed by Automerger Merge Worker
3 changed files with 9 additions and 4 deletions

View File

@@ -499,6 +499,8 @@ func (b *BootclasspathFragmentModule) DepsMutator(ctx android.BottomUpMutatorCon
for _, apiScope := range hiddenAPISdkLibrarySupportedScopes {
// Add a dependency onto a possibly scope specific stub library.
scopeSpecificDependency := apiScope.scopeSpecificStubModule(ctx, additionalStubModule)
// Use JavaApiLibraryName function to be redirected to stubs generated from .txt if applicable
scopeSpecificDependency = android.JavaApiLibraryName(ctx.Config(), scopeSpecificDependency)
tag := hiddenAPIStubsDependencyTag{apiScope: apiScope, fromAdditionalDependency: true}
ctx.AddVariationDependencies(nil, tag, scopeSpecificDependency)
}

View File

@@ -1267,7 +1267,10 @@ var implLibraryTag = sdkLibraryComponentTag{name: "impl-library"}
func (module *SdkLibrary) ComponentDepsMutator(ctx android.BottomUpMutatorContext) {
for _, apiScope := range module.getGeneratedApiScopes(ctx) {
// Add dependencies to the stubs library
ctx.AddVariationDependencies(nil, apiScope.stubsTag, module.stubsLibraryModuleName(apiScope))
stubModuleName := module.stubsLibraryModuleName(apiScope)
// Use JavaApiLibraryName function to be redirected to stubs generated from .txt if applicable
stubModuleName = android.JavaApiLibraryName(ctx.Config(), stubModuleName)
ctx.AddVariationDependencies(nil, apiScope.stubsTag, stubModuleName)
// Add a dependency on the stubs source in order to access both stubs source and api information.
ctx.AddVariationDependencies(nil, apiScope.stubsSourceAndApiTag, module.stubsSourceModuleName(apiScope))