Merge "Update transitive lib propagation" into main am: 3d9ba8ff90
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2808361 Change-Id: If006108cfad58951e97e1281c00cc3e7210cab61 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
17
java/base.go
17
java/base.go
@@ -1946,19 +1946,22 @@ func (j *providesTransitiveHeaderJars) collectTransitiveHeaderJars(ctx android.M
|
||||
}
|
||||
|
||||
dep := ctx.OtherModuleProvider(module, JavaInfoProvider).(JavaInfo)
|
||||
if dep.TransitiveLibsHeaderJars != nil {
|
||||
transitiveLibs = append(transitiveLibs, dep.TransitiveLibsHeaderJars)
|
||||
}
|
||||
if dep.TransitiveStaticLibsHeaderJars != nil {
|
||||
transitiveStaticLibs = append(transitiveStaticLibs, dep.TransitiveStaticLibsHeaderJars)
|
||||
}
|
||||
|
||||
tag := ctx.OtherModuleDependencyTag(module)
|
||||
_, isUsesLibDep := tag.(usesLibraryDependencyTag)
|
||||
if tag == libTag || tag == r8LibraryJarTag || isUsesLibDep {
|
||||
directLibs = append(directLibs, dep.HeaderJars...)
|
||||
} else if tag == staticLibTag {
|
||||
directStaticLibs = append(directStaticLibs, dep.HeaderJars...)
|
||||
} else {
|
||||
// Don't propagate transitive libs for other kinds of dependencies.
|
||||
return
|
||||
}
|
||||
|
||||
if dep.TransitiveLibsHeaderJars != nil {
|
||||
transitiveLibs = append(transitiveLibs, dep.TransitiveLibsHeaderJars)
|
||||
}
|
||||
if dep.TransitiveStaticLibsHeaderJars != nil {
|
||||
transitiveStaticLibs = append(transitiveStaticLibs, dep.TransitiveStaticLibsHeaderJars)
|
||||
}
|
||||
})
|
||||
j.transitiveLibsHeaderJars = android.NewDepSet(android.POSTORDER, directLibs, transitiveLibs)
|
||||
|
Reference in New Issue
Block a user