From 9ffaf28f5f733090c2ab64f448683f83d1fb6ade Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Mon, 12 Aug 2024 13:50:09 -0700 Subject: Rename collectTransitiveHeaderJars and friends to mention R8 collectTransitiveHeaderJarsForR8 visits direct dependencies and collects all transitive libs and static_libs header jars. The semantics of the collected jars are odd (it collects combined jars that contain the static libs, but also the static libs, and it collects transitive libs dependencies of static_libs), so these are only used to expand the --library arguments to R8. Rename the method and all the fields it uses with a "ForR8" suffix to avoid confusion when more transitive header jar collection is added to support transitive classpaths. Bug: 308016794 Test: all soong tests pass Change-Id: I291a86fbbc2e2f088598fb309d1b992080d60941 --- java/java.go | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'java/java.go') diff --git a/java/java.go b/java/java.go index f8e9909bc..8cc108541 100644 --- a/java/java.go +++ b/java/java.go @@ -259,10 +259,10 @@ type JavaInfo struct { RepackagedHeaderJars android.Paths // set of header jars for all transitive libs deps - TransitiveLibsHeaderJars *android.DepSet[android.Path] + TransitiveLibsHeaderJarsForR8 *android.DepSet[android.Path] // set of header jars for all transitive static libs deps - TransitiveStaticLibsHeaderJars *android.DepSet[android.Path] + TransitiveStaticLibsHeaderJarsForR8 *android.DepSet[android.Path] // ImplementationAndResourceJars is a list of jars that contain the implementations of classes // in the module as well as any resources included in the module. @@ -2634,7 +2634,7 @@ func (j *Import) GenerateAndroidBuildActions(ctx android.ModuleContext) { var flags javaBuilderFlags - j.collectTransitiveHeaderJars(ctx) + j.collectTransitiveHeaderJarsForR8(ctx) var staticJars android.Paths var staticResourceJars android.Paths var staticHeaderJars android.Paths @@ -2817,14 +2817,14 @@ func (j *Import) GenerateAndroidBuildActions(ctx android.ModuleContext) { } android.SetProvider(ctx, JavaInfoProvider, &JavaInfo{ - HeaderJars: android.PathsIfNonNil(j.combinedHeaderFile), - TransitiveLibsHeaderJars: j.transitiveLibsHeaderJars, - TransitiveStaticLibsHeaderJars: j.transitiveStaticLibsHeaderJars, - ImplementationAndResourcesJars: android.PathsIfNonNil(j.combinedImplementationFile), - ImplementationJars: android.PathsIfNonNil(implementationJarFile.WithoutRel()), - ResourceJars: android.PathsIfNonNil(resourceJarFile), - AidlIncludeDirs: j.exportAidlIncludeDirs, - StubsLinkType: j.stubsLinkType, + HeaderJars: android.PathsIfNonNil(j.combinedHeaderFile), + TransitiveLibsHeaderJarsForR8: j.transitiveLibsHeaderJarsForR8, + TransitiveStaticLibsHeaderJarsForR8: j.transitiveStaticLibsHeaderJarsForR8, + ImplementationAndResourcesJars: android.PathsIfNonNil(j.combinedImplementationFile), + ImplementationJars: android.PathsIfNonNil(implementationJarFile.WithoutRel()), + ResourceJars: android.PathsIfNonNil(resourceJarFile), + AidlIncludeDirs: j.exportAidlIncludeDirs, + StubsLinkType: j.stubsLinkType, // TODO(b/289117800): LOCAL_ACONFIG_FILES for prebuilts }) -- cgit v1.2.3-59-g8ed1b