Move ApexBundleInfoProvider from apex/ to android/

This provider contains information about the contents of an apex and is
set during the post deps phase of top-level source and prebuilt apexes.

java.dexpreoptDisabled needs to distinguish between platform and apex
variants of a library to prevent creating duplicate ninja rules. It does
so by looking at ApexInfoProvider. This provider gets set on the ctx of
the java_library being dexpreopted.

In case of prebuilts, these rules are being moved to the top-level
prebuilt apexes. Move ApexInfoBundleProvider from apex to android so
that java.dexpreoptDisabled can consume this provider without running
into a golang circular dependency. (java.dexpreoptDisabled will use this
provider in the next CL of this stack).

Test: go build ./android ./apex
Change-Id: I665abd9d0591eeb17b273cc822beb20690e6af09
This commit is contained in:
Spandan Das
2024-01-25 19:25:42 +00:00
parent 1f4475cee1
commit f5e03f1c1a
3 changed files with 12 additions and 11 deletions

View File

@@ -147,6 +147,13 @@ type ApexTestForInfo struct {
var ApexTestForInfoProvider = blueprint.NewMutatorProvider[ApexTestForInfo]("apex_test_for")
// ApexBundleInfo contains information about the dependencies of an apex
type ApexBundleInfo struct {
Contents *ApexContents
}
var ApexBundleInfoProvider = blueprint.NewMutatorProvider[ApexBundleInfo]("apex_info")
// DepIsInSameApex defines an interface that should be used to determine whether a given dependency
// should be considered as part of the same APEX as the current module or not. Note: this was
// extracted from ApexModule to make it easier to define custom subsets of the ApexModule interface