Loading android/filegroup.go +20 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ package android import ( "maps" "strings" "github.com/google/blueprint" Loading Loading @@ -97,6 +98,25 @@ func (fg *fileGroup) GenerateAndroidBuildActions(ctx ModuleContext) { } SetProvider(ctx, blueprint.SrcsFileProviderKey, blueprint.SrcsFileProviderData{SrcPaths: fg.srcs.Strings()}) CollectDependencyAconfigFiles(ctx, &fg.mergedAconfigFiles) var aconfigDeclarations []string var intermediateCacheOutputPaths Paths var srcjars Paths modeInfos := make(map[string]ModeInfo) ctx.VisitDirectDeps(func(module Module) { if dep, ok := OtherModuleProvider(ctx, module, CodegenInfoProvider); ok { aconfigDeclarations = append(aconfigDeclarations, dep.AconfigDeclarations...) intermediateCacheOutputPaths = append(intermediateCacheOutputPaths, dep.IntermediateCacheOutputPaths...) srcjars = append(srcjars, dep.Srcjars...) maps.Copy(modeInfos, dep.ModeInfos) } }) SetProvider(ctx, CodegenInfoProvider, CodegenInfo{ AconfigDeclarations: aconfigDeclarations, IntermediateCacheOutputPaths: intermediateCacheOutputPaths, Srcjars: srcjars, ModeInfos: modeInfos, }) } func (fg *fileGroup) Srcs() Paths { Loading java/base.go +29 −24 Original line number Diff line number Diff line Loading @@ -1227,6 +1227,7 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars, extraClasspath ExportedPluginClasses: j.exportedPluginClasses, ExportedPluginDisableTurbine: j.exportedDisableTurbine, StubsLinkType: j.stubsLinkType, AconfigIntermediateCacheOutputPaths: deps.aconfigProtoFiles, }) j.outputFile = j.headerJarFile Loading Loading @@ -1745,6 +1746,7 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars, extraClasspath ExportedPluginDisableTurbine: j.exportedDisableTurbine, JacocoReportClassesFile: j.jacocoReportClassesFile, StubsLinkType: j.stubsLinkType, AconfigIntermediateCacheOutputPaths: deps.aconfigProtoFiles, }) // Save the output file with no relative path so that it doesn't end up in a subdirectory when used as a resource Loading Loading @@ -2295,6 +2297,7 @@ func (j *Module) collectDeps(ctx android.ModuleContext) deps { // annotation processor that generates API is incompatible with the turbine // optimization. deps.disableTurbine = deps.disableTurbine || dep.ExportedPluginDisableTurbine deps.aconfigProtoFiles = append(deps.aconfigProtoFiles, dep.AconfigIntermediateCacheOutputPaths...) case pluginTag: if plugin, ok := module.(*Plugin); ok { if plugin.pluginProperties.Processor_class != nil { Loading Loading @@ -2353,6 +2356,8 @@ func (j *Module) collectDeps(ctx android.ModuleContext) deps { deps.staticJars = append(deps.staticJars, dep.Srcs()...) deps.staticHeaderJars = append(deps.staticHeaderJars, dep.Srcs()...) } } else if dep, ok := android.OtherModuleProvider(ctx, module, android.CodegenInfoProvider); ok { deps.aconfigProtoFiles = append(deps.aconfigProtoFiles, dep.IntermediateCacheOutputPaths...) } else { switch tag { case bootClasspathTag: Loading java/java.go +4 −0 Original line number Diff line number Diff line Loading @@ -309,6 +309,10 @@ type JavaInfo struct { // implementation jars. If the provider is set by java_sdk_library, the link type is "unknown" // and selection between the stub jar vs implementation jar is deferred to SdkLibrary.sdkJars(...) StubsLinkType StubsLinkType // AconfigIntermediateCacheOutputPaths is a path to the cache files collected from the // java_aconfig_library modules that are statically linked to this module. AconfigIntermediateCacheOutputPaths android.Paths } var JavaInfoProvider = blueprint.NewProvider[JavaInfo]() Loading Loading
android/filegroup.go +20 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ package android import ( "maps" "strings" "github.com/google/blueprint" Loading Loading @@ -97,6 +98,25 @@ func (fg *fileGroup) GenerateAndroidBuildActions(ctx ModuleContext) { } SetProvider(ctx, blueprint.SrcsFileProviderKey, blueprint.SrcsFileProviderData{SrcPaths: fg.srcs.Strings()}) CollectDependencyAconfigFiles(ctx, &fg.mergedAconfigFiles) var aconfigDeclarations []string var intermediateCacheOutputPaths Paths var srcjars Paths modeInfos := make(map[string]ModeInfo) ctx.VisitDirectDeps(func(module Module) { if dep, ok := OtherModuleProvider(ctx, module, CodegenInfoProvider); ok { aconfigDeclarations = append(aconfigDeclarations, dep.AconfigDeclarations...) intermediateCacheOutputPaths = append(intermediateCacheOutputPaths, dep.IntermediateCacheOutputPaths...) srcjars = append(srcjars, dep.Srcjars...) maps.Copy(modeInfos, dep.ModeInfos) } }) SetProvider(ctx, CodegenInfoProvider, CodegenInfo{ AconfigDeclarations: aconfigDeclarations, IntermediateCacheOutputPaths: intermediateCacheOutputPaths, Srcjars: srcjars, ModeInfos: modeInfos, }) } func (fg *fileGroup) Srcs() Paths { Loading
java/base.go +29 −24 Original line number Diff line number Diff line Loading @@ -1227,6 +1227,7 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars, extraClasspath ExportedPluginClasses: j.exportedPluginClasses, ExportedPluginDisableTurbine: j.exportedDisableTurbine, StubsLinkType: j.stubsLinkType, AconfigIntermediateCacheOutputPaths: deps.aconfigProtoFiles, }) j.outputFile = j.headerJarFile Loading Loading @@ -1745,6 +1746,7 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars, extraClasspath ExportedPluginDisableTurbine: j.exportedDisableTurbine, JacocoReportClassesFile: j.jacocoReportClassesFile, StubsLinkType: j.stubsLinkType, AconfigIntermediateCacheOutputPaths: deps.aconfigProtoFiles, }) // Save the output file with no relative path so that it doesn't end up in a subdirectory when used as a resource Loading Loading @@ -2295,6 +2297,7 @@ func (j *Module) collectDeps(ctx android.ModuleContext) deps { // annotation processor that generates API is incompatible with the turbine // optimization. deps.disableTurbine = deps.disableTurbine || dep.ExportedPluginDisableTurbine deps.aconfigProtoFiles = append(deps.aconfigProtoFiles, dep.AconfigIntermediateCacheOutputPaths...) case pluginTag: if plugin, ok := module.(*Plugin); ok { if plugin.pluginProperties.Processor_class != nil { Loading Loading @@ -2353,6 +2356,8 @@ func (j *Module) collectDeps(ctx android.ModuleContext) deps { deps.staticJars = append(deps.staticJars, dep.Srcs()...) deps.staticHeaderJars = append(deps.staticHeaderJars, dep.Srcs()...) } } else if dep, ok := android.OtherModuleProvider(ctx, module, android.CodegenInfoProvider); ok { deps.aconfigProtoFiles = append(deps.aconfigProtoFiles, dep.IntermediateCacheOutputPaths...) } else { switch tag { case bootClasspathTag: Loading
java/java.go +4 −0 Original line number Diff line number Diff line Loading @@ -309,6 +309,10 @@ type JavaInfo struct { // implementation jars. If the provider is set by java_sdk_library, the link type is "unknown" // and selection between the stub jar vs implementation jar is deferred to SdkLibrary.sdkJars(...) StubsLinkType StubsLinkType // AconfigIntermediateCacheOutputPaths is a path to the cache files collected from the // java_aconfig_library modules that are statically linked to this module. AconfigIntermediateCacheOutputPaths android.Paths } var JavaInfoProvider = blueprint.NewProvider[JavaInfo]() Loading