bp2build java_libraries depend on Android SDK
Soong adds an implicit dependency on the Android SDK for all java_libraries (and related modules). This feature becomes apparent after converting arch-variant srcs for android_apps, so we should suport this for now. Eventually, we will want to replace this forced dependency with a Bazel toolchain workaround. Test: build/bazel/ci/bp2build.sh Change-Id: Ic28e8c7690f69294b4bdcb9bb78a6f1f031fe97e
This commit is contained in:
@@ -2030,6 +2030,11 @@ func (m *Library) convertLibraryAttrsBp2Build(ctx android.TopDownMutatorContext)
|
||||
}
|
||||
|
||||
var deps bazel.LabelList
|
||||
sdkVersion := m.SdkVersion(ctx)
|
||||
if sdkVersion.Kind == android.SdkPublic && sdkVersion.ApiLevel == android.FutureApiLevel {
|
||||
// TODO(b/220869005) remove forced dependency on current public android.jar
|
||||
deps.Add(&bazel.Label{Label: "//prebuilts/sdk:public_current_android_sdk_java_import"})
|
||||
}
|
||||
if m.properties.Libs != nil {
|
||||
deps.Append(android.BazelLabelForModuleDeps(ctx, m.properties.Libs))
|
||||
}
|
||||
|
Reference in New Issue
Block a user