diff options
author | 2024-04-05 00:36:44 +0000 | |
---|---|---|
committer | 2024-05-08 17:46:31 +0000 | |
commit | a3a05460b478ed59c527dec1c8b2efa61ce9c53c (patch) | |
tree | 2211be9cc3edca98e2b9b1b368687ddada164661 /android | |
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 'android')
-rw-r--r-- | android/apex_contributions.go | 6 | ||||
-rw-r--r-- | android/base_module_context.go | 2 | ||||
-rw-r--r-- | android/prebuilt.go | 6 | ||||
-rw-r--r-- | android/testing.go | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/android/apex_contributions.go b/android/apex_contributions.go index dd09fbf44..03e32d6fa 100644 --- a/android/apex_contributions.go +++ b/android/apex_contributions.go @@ -103,12 +103,12 @@ type apexContributionsDepTag struct { } var ( - acDepTag = apexContributionsDepTag{} + AcDepTag = apexContributionsDepTag{} ) // Creates a dep to each selected apex_contributions func (a *allApexContributions) DepsMutator(ctx BottomUpMutatorContext) { - ctx.AddDependency(ctx.Module(), acDepTag, ctx.Config().AllApexContributions()...) + ctx.AddDependency(ctx.Module(), AcDepTag, ctx.Config().AllApexContributions()...) } // Set PrebuiltSelectionInfoProvider in post deps phase @@ -142,7 +142,7 @@ func (a *allApexContributions) SetPrebuiltSelectionInfoProvider(ctx BaseModuleCo // (e.g. shiba and shiba_fullmte) // Eventually these product variants will have their own release config maps. if !proptools.Bool(ctx.Config().BuildIgnoreApexContributionContents()) { - ctx.VisitDirectDepsWithTag(acDepTag, func(child Module) { + ctx.VisitDirectDepsWithTag(AcDepTag, func(child Module) { if m, ok := child.(*apexContributions); ok { addContentsToProvider(&p, m) } else { diff --git a/android/base_module_context.go b/android/base_module_context.go index c5fe58578..2dc1fd7c6 100644 --- a/android/base_module_context.go +++ b/android/base_module_context.go @@ -536,7 +536,7 @@ func IsMetaDependencyTag(tag blueprint.DependencyTag) bool { return true } else if tag == licensesTag { return true - } else if tag == acDepTag { + } else if tag == AcDepTag { return true } return false diff --git a/android/prebuilt.go b/android/prebuilt.go index 91ba05b6b..794ddcc2f 100644 --- a/android/prebuilt.go +++ b/android/prebuilt.go @@ -437,7 +437,7 @@ func PrebuiltSourceDepsMutator(ctx BottomUpMutatorContext) { // TODO: When all branches contain this singleton module, make this strict // TODO: Add this dependency only for mainline prebuilts and not every prebuilt module if ctx.OtherModuleExists("all_apex_contributions") { - ctx.AddDependency(m, acDepTag, "all_apex_contributions") + ctx.AddDependency(m, AcDepTag, "all_apex_contributions") } } @@ -474,7 +474,7 @@ func PrebuiltSelectModuleMutator(ctx BottomUpMutatorContext) { } // Propagate the provider received from `all_apex_contributions` // to the source module - ctx.VisitDirectDepsWithTag(acDepTag, func(am Module) { + ctx.VisitDirectDepsWithTag(AcDepTag, func(am Module) { psi, _ := OtherModuleProvider(ctx, am, PrebuiltSelectionInfoProvider) SetProvider(ctx, PrebuiltSelectionInfoProvider, psi) }) @@ -580,7 +580,7 @@ func PrebuiltPostDepsMutator(ctx BottomUpMutatorContext) { bmn, _ := m.(baseModuleName) name := bmn.BaseModuleName() psi := PrebuiltSelectionInfoMap{} - ctx.VisitDirectDepsWithTag(acDepTag, func(am Module) { + ctx.VisitDirectDepsWithTag(AcDepTag, func(am Module) { psi, _ = OtherModuleProvider(ctx, am, PrebuiltSelectionInfoProvider) }) diff --git a/android/testing.go b/android/testing.go index 7b4411e2f..a67624a3f 100644 --- a/android/testing.go +++ b/android/testing.go @@ -1122,7 +1122,7 @@ func AndroidMkEntriesForTest(t *testing.T, ctx *TestContext, mod blueprint.Modul entriesList := p.AndroidMkEntries() aconfigUpdateAndroidMkEntries(ctx, mod.(Module), &entriesList) - for i, _ := range entriesList { + for i := range entriesList { entriesList[i].fillInEntries(ctx, mod) } return entriesList |