Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0843b79d authored by Anton Hansson's avatar Anton Hansson Committed by Gerrit Code Review
Browse files

Merge "Make the srcjar for bcp available in OutputFiles" into main

parents c38757d0 b3738ed1
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -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)