Don't add dexpreopt compat deps to android_library modules

android_library modules are only dexpreopted when built into an app,
and the app will already get the dexpreopt compat dependencies itself.
Adding the compat dependencies to android_library modules causes
circular dependencies when the android_library is used to build
part of the framework, which is then used to build the compat libraries,
which is added as a dependency to the andorid_library.

Test: TestUsesLibraries
Change-Id: I3aca780858c7e5f19d270bcbbe18e6cff8616b43
This commit is contained in:
Colin Cross
2022-12-21 21:51:52 -08:00
parent 9f8599549d
commit 4a80a158d4
2 changed files with 5 additions and 5 deletions

View File

@@ -525,7 +525,7 @@ func (a *AndroidLibrary) DepsMutator(ctx android.BottomUpMutatorContext) {
if sdkDep.hasFrameworkLibs() {
a.aapt.deps(ctx, sdkDep)
}
a.usesLibrary.deps(ctx, sdkDep.hasFrameworkLibs())
a.usesLibrary.deps(ctx, false)
}
func (a *AndroidLibrary) GenerateAndroidBuildActions(ctx android.ModuleContext) {