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

@@ -3542,16 +3542,10 @@ func TestApexAvailable_IndirectDep(t *testing.T) {
testApexError(t, `requires "libbaz" that is not available for the APEX. Dependency path:
.*via tag apex\.dependencyTag.*"sharedLib".*
.*-> libfoo.*link:shared.*
.*via tag cc\.DependencyTag.*"reuse objects".*
.*-> libfoo.*link:static.*
.*via tag cc\.DependencyTag.*"shared from static".*
.*via tag cc\.DependencyTag.*"shared".*
.*-> libbar.*link:shared.*
.*via tag cc\.DependencyTag.*"reuse objects".*
.*-> libbar.*link:static.*
.*via tag cc\.DependencyTag.*"shared from static".*
.*-> libbaz.*link:shared.*
.*via tag cc\.DependencyTag.*"reuse objects".*
.*-> libbaz.*link:static.*`, `
.*via tag cc\.DependencyTag.*"shared".*
.*-> libbaz.*link:shared.*`, `
apex {
name: "myapex",
key: "myapex.key",