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

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

Change-Id: I05d5a50bde4f0a90a8ec4ee40ed0ef51a0d3c988
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Anton Hansson
2023-09-28 19:45:51 +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)