Merge "Refactor the contruction of the manifest check inputs." into main

This commit is contained in:
Jiakai Zhang
2024-04-12 06:50:15 +00:00
committed by Android (Google) Code Review
9 changed files with 113 additions and 73 deletions

View File

@@ -961,8 +961,8 @@ func (j *Library) GenerateAndroidBuildActions(ctx android.ModuleContext) {
}
func (j *Library) DepsMutator(ctx android.BottomUpMutatorContext) {
j.deps(ctx)
j.usesLibrary.deps(ctx, false)
j.deps(ctx)
}
const (
@@ -3151,7 +3151,13 @@ func addCLCFromDep(ctx android.ModuleContext, depModule android.Module,
// <uses_library> and should not be added to CLC, but the transitive <uses-library> dependencies
// from its CLC should be added to the current CLC.
if sdkLib != nil {
clcMap.AddContext(ctx, dexpreopt.AnySdkVersion, *sdkLib, false,
optional := false
if module, ok := ctx.Module().(ModuleWithUsesLibrary); ok {
if android.InList(*sdkLib, module.UsesLibrary().usesLibraryProperties.Optional_uses_libs) {
optional = true
}
}
clcMap.AddContext(ctx, dexpreopt.AnySdkVersion, *sdkLib, optional,
dep.DexJarBuildPath(ctx).PathOrNil(), dep.DexJarInstallPath(), dep.ClassLoaderContexts())
} else {
clcMap.AddContextMap(dep.ClassLoaderContexts(), depName)