Merge "Make the srcjar for bcp available in OutputFiles" into main am: 0843b79d8c

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2760367

Change-Id: Ie50e0e8b4617ce3ae8e8664c59d86be795a97d7c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Anton Hansson
2023-09-28 17:25:03 +00:00
committed by Automerger Merge Worker

View File

@@ -57,6 +57,9 @@ type platformBootclasspathModule struct {
// Path to the monolithic hiddenapi-unsupported.csv file.
hiddenAPIMetadataCSV android.OutputPath
// Path to a srcjar containing all the transitive sources of the bootclasspath.
srcjar android.OutputPath
}
type platformBootclasspathProperties struct {
@@ -95,6 +98,8 @@ func (b *platformBootclasspathModule) OutputFiles(tag string) (android.Paths, er
return android.Paths{b.hiddenAPIIndexCSV}, nil
case "hiddenapi-metadata.csv":
return android.Paths{b.hiddenAPIMetadataCSV}, nil
case ".srcjar":
return android.Paths{b.srcjar}, nil
}
return nil, fmt.Errorf("unknown tag %s", tag)
@@ -182,8 +187,8 @@ func (b *platformBootclasspathModule) GenerateAndroidBuildActions(ctx android.Mo
}
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)
b.srcjar = android.PathForModuleOut(ctx, ctx.ModuleName()+"-transitive.srcjar").OutputPath
TransformResourcesToJar(ctx, b.srcjar, jarArgs, transitiveSrcFiles)
// Gather all the fragments dependencies.
b.fragments = gatherApexModulePairDepsWithTag(ctx, bootclasspathFragmentDepTag)