temporary unblock for builds using sdkSystem

Bug: 215230098
Change-Id: I521342c676f3362d3e1db0aab7924a04602525e1
Test:  built captiveportal-lib and inspected BUILD file
This commit is contained in:
Alix
2023-02-10 15:57:01 +00:00
parent 789e532a04
commit 79f853d7b9
2 changed files with 23 additions and 18 deletions

View File

@@ -2807,6 +2807,9 @@ func javaLibraryBp2Build(ctx android.TopDownMutatorContext, m *Library) {
if sdkVersion.Kind == android.SdkPublic && sdkVersion.ApiLevel == android.FutureApiLevel {
// TODO(b/220869005) remove forced dependency on current public android.jar
deps.Add(bazel.MakeLabelAttribute("//prebuilts/sdk:public_current_android_sdk_java_import"))
} else if sdkVersion.Kind == android.SdkSystem && sdkVersion.ApiLevel == android.FutureApiLevel {
// TODO(b/215230098) remove forced dependency on current public android.jar
deps.Add(bazel.MakeLabelAttribute("//prebuilts/sdk:system_current_android_sdk_java_import"))
}
} else if !deps.IsEmpty() {
ctx.ModuleErrorf("Module has direct dependencies but no sources. Bazel will not allow this.")