Stop requiring apex_available on java_library members of sdks

Previously, adding java_library to an sdk required that the names of
any APEXes that transitively compiled against it were added to its
apex_available property. This change removes that requirement.

Also corrects the dependency path in the TestApexAvailable_IndirectDep
error which previously passed through "shared from static" static
dependency tags even though those are explicitly NOT followed when
checking apex_available settings.

Bug: 152878661
Test: m droid
Change-Id: I995ed38956c1bc210b09494812de012fed9f9232
This commit is contained in:
Paul Duffin
2020-03-31 15:23:40 +01:00
parent c519244cd5
commit 6534770793
5 changed files with 34 additions and 36 deletions

View File

@@ -53,30 +53,18 @@ func TestBasicSdkWithJavaLibrary(t *testing.T) {
system_modules: "none",
sdk_version: "none",
host_supported: true,
apex_available: [
"//apex_available:platform",
"//apex_available:anyapex",
],
}
java_import {
name: "sdkmember_mysdk_1",
sdk_member_name: "sdkmember",
host_supported: true,
apex_available: [
"//apex_available:platform",
"//apex_available:anyapex",
],
}
java_import {
name: "sdkmember_mysdk_2",
sdk_member_name: "sdkmember",
host_supported: true,
apex_available: [
"//apex_available:platform",
"//apex_available:anyapex",
],
}
java_library {