Merge "Align CLC add context behavior between java_sdk_library and its impl lib" into main am: feeb6d1e7b am: 5f2bd29169

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

Change-Id: I7578b3e7225d9c108c66118bd0cbd89b0bf70db2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot
2024-09-18 18:24:45 +00:00
committed by Automerger Merge Worker

View File

@@ -3345,6 +3345,10 @@ func addCLCFromDep(ctx android.ModuleContext, depModule android.Module,
if lib, ok := depModule.(SdkLibraryDependency); ok && lib.sharedLibrary() {
// A shared SDK library. This should be added as a top-level CLC element.
sdkLib = &depName
} else if lib, ok := depModule.(SdkLibraryComponentDependency); ok && lib.OptionalSdkLibraryImplementation() != nil {
if depModule.Name() == proptools.String(lib.OptionalSdkLibraryImplementation())+".impl" {
sdkLib = lib.OptionalSdkLibraryImplementation()
}
} else if ulib, ok := depModule.(ProvidesUsesLib); ok {
// A non-SDK library disguised as an SDK library by the means of `provides_uses_lib`
// property. This should be handled in the same way as a shared SDK library.