diff options
| author | 2020-03-10 23:53:41 +0000 | |
|---|---|---|
| committer | 2020-03-10 23:53:41 +0000 | |
| commit | 4c8e3509ee9a5d7c84ae50688124d8e937aead43 (patch) | |
| tree | 0b2ef73929c824ee2751de1ee2df26dd2958436f /java/java.go | |
| parent | 865171ed402856a25345bcd23b376a27f160c340 (diff) | |
| parent | 5e9013be2202effb500a0aa14d95f5fef70cc75e (diff) | |
Merge "Fix apex_available"
Diffstat (limited to 'java/java.go')
| -rw-r--r-- | java/java.go | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/java/java.go b/java/java.go index d0b5adfa9..8c779f5c4 100644 --- a/java/java.go +++ b/java/java.go @@ -1796,11 +1796,16 @@ func (j *Module) hasCode(ctx android.ModuleContext) bool { } func (j *Module) DepIsInSameApex(ctx android.BaseModuleContext, dep android.Module) bool { - depTag := ctx.OtherModuleDependencyTag(dep) // Dependencies other than the static linkage are all considered crossing APEX boundary + if staticLibTag == ctx.OtherModuleDependencyTag(dep) { + return true + } // Also, a dependency to an sdk member is also considered as such. This is required because // sdk members should be mutated into APEXes. Refer to sdk.sdkDepsReplaceMutator. - return depTag == staticLibTag || j.IsInAnySdk() + if sa, ok := dep.(android.SdkAware); ok && sa.IsInAnySdk() { + return true + } + return false } func (j *Module) Stem() string { @@ -2504,11 +2509,16 @@ func (j *Import) SrcJarArgs() ([]string, android.Paths) { } func (j *Import) DepIsInSameApex(ctx android.BaseModuleContext, dep android.Module) bool { - depTag := ctx.OtherModuleDependencyTag(dep) // dependencies other than the static linkage are all considered crossing APEX boundary + if staticLibTag == ctx.OtherModuleDependencyTag(dep) { + return true + } // Also, a dependency to an sdk member is also considered as such. This is required because // sdk members should be mutated into APEXes. Refer to sdk.sdkDepsReplaceMutator. - return depTag == staticLibTag || j.IsInAnySdk() + if sa, ok := dep.(android.SdkAware); ok && sa.IsInAnySdk() { + return true + } + return false } // Add compile time check for interface implementation |