Loading android/apex.go +7 −0 Original line number Diff line number Diff line Loading @@ -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 Loading apex/apex.go +4 −10 Original line number Diff line number Diff line Loading @@ -929,12 +929,6 @@ type DCLAInfo struct { var DCLAInfoProvider = blueprint.NewMutatorProvider[DCLAInfo]("apex_info") type ApexBundleInfo struct { Contents *android.ApexContents } var ApexBundleInfoProvider = blueprint.NewMutatorProvider[ApexBundleInfo]("apex_info") var _ ApexInfoMutator = (*apexBundle)(nil) func (a *apexBundle) ApexVariationName() string { Loading Loading @@ -1035,7 +1029,7 @@ func (a *apexBundle) ApexInfoMutator(mctx android.TopDownMutatorContext) { // The membership information is saved for later access apexContents := android.NewApexContents(contents) android.SetProvider(mctx, ApexBundleInfoProvider, ApexBundleInfo{ android.SetProvider(mctx, android.ApexBundleInfoProvider, android.ApexBundleInfo{ Contents: apexContents, }) Loading Loading @@ -1243,7 +1237,7 @@ func apexTestForMutator(mctx android.BottomUpMutatorContext) { if _, ok := mctx.Module().(android.ApexModule); ok { var contents []*android.ApexContents for _, testFor := range mctx.GetDirectDepsWithTag(testForTag) { abInfo, _ := android.OtherModuleProvider(mctx, testFor, ApexBundleInfoProvider) abInfo, _ := android.OtherModuleProvider(mctx, testFor, android.ApexBundleInfoProvider) contents = append(contents, abInfo.Contents) } android.SetProvider(mctx, android.ApexTestForInfoProvider, android.ApexTestForInfo{ Loading Loading @@ -2192,7 +2186,7 @@ func (a *apexBundle) depVisitor(vctx *visitorContext, ctx android.ModuleContext, af := apexFileForNativeLibrary(ctx, ch, vctx.handleSpecialLibs) af.transitiveDep = true abInfo, _ := android.ModuleProvider(ctx, ApexBundleInfoProvider) abInfo, _ := android.ModuleProvider(ctx, android.ApexBundleInfoProvider) if !abInfo.Contents.DirectlyInApex(depName) && (ch.IsStubs() || ch.HasStubsVariants()) { // If the dependency is a stubs lib, don't include it in this APEX, // but make sure that the lib is installed on the device. Loading Loading @@ -2658,7 +2652,7 @@ func (a *apexBundle) checkStaticLinkingToStubLibraries(ctx android.ModuleContext return } abInfo, _ := android.ModuleProvider(ctx, ApexBundleInfoProvider) abInfo, _ := android.ModuleProvider(ctx, android.ApexBundleInfoProvider) a.WalkPayloadDeps(ctx, func(ctx android.ModuleContext, from blueprint.Module, to android.ApexModule, externalDep bool) bool { if ccm, ok := to.(*cc.Module); ok { Loading apex/prebuilt.go +1 −1 Original line number Diff line number Diff line Loading @@ -438,7 +438,7 @@ func (p *prebuiltCommon) apexInfoMutator(mctx android.TopDownMutatorContext) { // Create contents for the prebuilt_apex and store it away for later use. apexContents := android.NewApexContents(contents) android.SetProvider(mctx, ApexBundleInfoProvider, ApexBundleInfo{ android.SetProvider(mctx, android.ApexBundleInfoProvider, android.ApexBundleInfo{ Contents: apexContents, }) Loading Loading
android/apex.go +7 −0 Original line number Diff line number Diff line Loading @@ -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 Loading
apex/apex.go +4 −10 Original line number Diff line number Diff line Loading @@ -929,12 +929,6 @@ type DCLAInfo struct { var DCLAInfoProvider = blueprint.NewMutatorProvider[DCLAInfo]("apex_info") type ApexBundleInfo struct { Contents *android.ApexContents } var ApexBundleInfoProvider = blueprint.NewMutatorProvider[ApexBundleInfo]("apex_info") var _ ApexInfoMutator = (*apexBundle)(nil) func (a *apexBundle) ApexVariationName() string { Loading Loading @@ -1035,7 +1029,7 @@ func (a *apexBundle) ApexInfoMutator(mctx android.TopDownMutatorContext) { // The membership information is saved for later access apexContents := android.NewApexContents(contents) android.SetProvider(mctx, ApexBundleInfoProvider, ApexBundleInfo{ android.SetProvider(mctx, android.ApexBundleInfoProvider, android.ApexBundleInfo{ Contents: apexContents, }) Loading Loading @@ -1243,7 +1237,7 @@ func apexTestForMutator(mctx android.BottomUpMutatorContext) { if _, ok := mctx.Module().(android.ApexModule); ok { var contents []*android.ApexContents for _, testFor := range mctx.GetDirectDepsWithTag(testForTag) { abInfo, _ := android.OtherModuleProvider(mctx, testFor, ApexBundleInfoProvider) abInfo, _ := android.OtherModuleProvider(mctx, testFor, android.ApexBundleInfoProvider) contents = append(contents, abInfo.Contents) } android.SetProvider(mctx, android.ApexTestForInfoProvider, android.ApexTestForInfo{ Loading Loading @@ -2192,7 +2186,7 @@ func (a *apexBundle) depVisitor(vctx *visitorContext, ctx android.ModuleContext, af := apexFileForNativeLibrary(ctx, ch, vctx.handleSpecialLibs) af.transitiveDep = true abInfo, _ := android.ModuleProvider(ctx, ApexBundleInfoProvider) abInfo, _ := android.ModuleProvider(ctx, android.ApexBundleInfoProvider) if !abInfo.Contents.DirectlyInApex(depName) && (ch.IsStubs() || ch.HasStubsVariants()) { // If the dependency is a stubs lib, don't include it in this APEX, // but make sure that the lib is installed on the device. Loading Loading @@ -2658,7 +2652,7 @@ func (a *apexBundle) checkStaticLinkingToStubLibraries(ctx android.ModuleContext return } abInfo, _ := android.ModuleProvider(ctx, ApexBundleInfoProvider) abInfo, _ := android.ModuleProvider(ctx, android.ApexBundleInfoProvider) a.WalkPayloadDeps(ctx, func(ctx android.ModuleContext, from blueprint.Module, to android.ApexModule, externalDep bool) bool { if ccm, ok := to.(*cc.Module); ok { Loading
apex/prebuilt.go +1 −1 Original line number Diff line number Diff line Loading @@ -438,7 +438,7 @@ func (p *prebuiltCommon) apexInfoMutator(mctx android.TopDownMutatorContext) { // Create contents for the prebuilt_apex and store it away for later use. apexContents := android.NewApexContents(contents) android.SetProvider(mctx, ApexBundleInfoProvider, ApexBundleInfo{ android.SetProvider(mctx, android.ApexBundleInfoProvider, android.ApexBundleInfo{ Contents: apexContents, }) Loading