Add srcjar output for platform_bootclasspath
This output contains all the transitive sources that are contained in the bootclasspath. It's currently limited to source-built bootclasspath components. Future work will make this deal with sdk_library prebuilts. Bug: 151360309 Test: unit test, as well as manual inspection of platform-bootclasspath Change-Id: Ie05d8125e19736d8b4b9ebafb70b88a0a40069d5
This commit is contained in:
@@ -173,6 +173,18 @@ func (b *platformBootclasspathModule) GenerateAndroidBuildActions(ctx android.Mo
|
||||
allModules = append(allModules, apexModules...)
|
||||
b.configuredModules = allModules
|
||||
|
||||
var transitiveSrcFiles android.Paths
|
||||
for _, module := range allModules {
|
||||
depInfo := ctx.OtherModuleProvider(module, JavaInfoProvider).(JavaInfo)
|
||||
if depInfo.TransitiveSrcFiles != nil {
|
||||
transitiveSrcFiles = append(transitiveSrcFiles, depInfo.TransitiveSrcFiles.ToList()...)
|
||||
}
|
||||
}
|
||||
jarArgs := resourcePathsToJarArgs(transitiveSrcFiles)
|
||||
jarArgs = append(jarArgs, "-srcjar") // Move srcfiles to the right package
|
||||
transitiveSrcJar := android.PathForModuleOut(ctx, ctx.ModuleName()+"-transitive.srcjar")
|
||||
TransformResourcesToJar(ctx, transitiveSrcJar, jarArgs, transitiveSrcFiles)
|
||||
|
||||
// Gather all the fragments dependencies.
|
||||
b.fragments = gatherApexModulePairDepsWithTag(ctx, bootclasspathFragmentDepTag)
|
||||
|
||||
|
Reference in New Issue
Block a user