platform_build_soong/sdk
Jooyung Han b8fa86ad6f Fix apex_available
Checking apex_available was missing some corner cases.
For example, the deps of share deps of cc_library modules are missed
while those from cc_library_shared are correctly tracked.

This was due to..

* calling DepIsInSameApex in WalkDeps: both work fine separately, but
when they are used together, it fails to work. It's due to how WalkDeps
works. (We might fix this bug too risky since it is used very widely)
* incorrect receiver for DepIsInSameApex in apex_deps mutator: receiver
is supposed to be parent, but child was used before. Interestingly lots
of deps are within the same group of module types(cc to cc, java to
java), it has worked. (note that receiver's DepIsInSameApex
implementation can be different).

This change fixes them by..

* walkPayloadDeps is now relying on ApexVariation, which is calculated
correctly by TopDown apex_deps mutator.
* use correct receiver for DepIsInSameApex in apex_deps mutator, which
requires for java.SdkLibrary to override the method and for
java.Library/Import to use passed dep instead of receiver to check its
membership of sdk.

Exempt-From-Owner-Approval: cherry-pick from aosp/master

Bug: 151071238
Test: build/boot
Merged-In: I0569ef4bb8e79635e4d97a89f421a8d8b7d26456
(cherry picked from commit 5e9013be22)
Change-Id: I0569ef4bb8e79635e4d97a89f421a8d8b7d26456
2020-03-11 16:38:21 +09:00
..
bp.go Allow an arbitrary tag to be associated with a bp property 2020-01-30 11:45:47 +00:00
cc_sdk_test.go Make apex use cc.GatherRequiredDepsForTests 2020-02-19 19:07:11 -08:00
exports.go Restrict SdkMemberTypes that can be used with sdk/sdk_snapshot 2019-12-31 15:08:59 +00:00
exports_test.go Added module_exports/_snapshot as alias for sdk/_snapshot 2019-12-30 18:03:30 +00:00
java_sdk_test.go Differentiate between exported and internal sdk members 2020-02-07 14:03:03 +00:00
sdk.go Do not add dependencies from disabled sdk variants to its members 2020-02-20 21:51:52 +00:00
sdk_test.go Fix apex_available 2020-03-11 16:38:21 +09:00
testing.go Move NDK test modules into cc/testing.go 2020-02-19 18:59:15 -08:00
update.go Differentiate between exported and internal sdk members 2020-02-07 14:03:03 +00:00