diff options
author | 2024-04-05 00:36:44 +0000 | |
---|---|---|
committer | 2024-05-08 17:46:31 +0000 | |
commit | a3a05460b478ed59c527dec1c8b2efa61ce9c53c (patch) | |
tree | 2211be9cc3edca98e2b9b1b368687ddada164661 /java/dexpreopt.go | |
parent | 248cc0072c71de6b778b82d9ebe4c7fb6bf82bdc (diff) |
Revert^2 "Remove compilation actions from java sdk library"
This change modifies the build actions of java_sdk_library module type
so that it does not perform any compilation actions (i.e. does not
create the top level java_sdk_library jar file). Instead, it delegates
the build actions the top level jar file was performing to the
dynamically created ".impl"-suffixed java library module. The build
actions that are delegated to the impl library module include hiddenapi
processing, dexing, and dexpreopt.
This change relands https://r.android.com/3035972. Implementation
changes from the original change:
- "all_apex_contributions" is added as a dependecy to the implementation
library modules where the parent sdk_library module has a prebuilt
equivalent. This allows the source apex variant to be hidden from make
when the prebuilt is active.
Test: patch in internal main, lunch barbet-ap2a-userdebug && m nothing
Test: m nothing --no-skip-soong-tests
Bug: 332785297
Change-Id: I017938e5567aef82e428e7ceb557d9c9090e0257
Diffstat (limited to 'java/dexpreopt.go')
-rw-r--r-- | java/dexpreopt.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/java/dexpreopt.go b/java/dexpreopt.go index 25e95db14..1acac1b40 100644 --- a/java/dexpreopt.go +++ b/java/dexpreopt.go @@ -196,8 +196,10 @@ func disableSourceApexVariant(ctx android.BaseModuleContext) bool { } apexInfo, _ := android.ModuleProvider(ctx, android.ApexInfoProvider) psi := android.PrebuiltSelectionInfoMap{} - ctx.VisitDirectDepsWithTag(android.PrebuiltDepTag, func(am android.Module) { - psi, _ = android.OtherModuleProvider(ctx, am, android.PrebuiltSelectionInfoProvider) + ctx.VisitDirectDeps(func(am android.Module) { + if prebuiltSelectionInfo, ok := android.OtherModuleProvider(ctx, am, android.PrebuiltSelectionInfoProvider); ok { + psi = prebuiltSelectionInfo + } }) // Find the apex variant for this module _, apexVariantsWithoutTestApexes, _ := android.ListSetDifference(apexInfo.InApexVariants, apexInfo.TestApexes) |