summaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
author Jiyong Park <jiyong@google.com> 2019-10-15 15:20:07 +0900
committer Jiyong Park <jiyong@google.com> 2019-10-17 11:19:53 +0900
commita7bc8ad0b9ec3f762e45af4d60b96922782616cf (patch)
tree27f1d00bab4faa7028ef633504a9ab3a2812324f /java/java.go
parentd7d5e5a1ac9bbe24b13ed31272fe74b1294e5ab1 (diff)
Prohibit dependencies outside of uses_sdks
When an APEX is built with uses_sdks, any depedndency from the APEX to the outside of the APEX should be from the SDKs that the APEX is built against. Bug: 138182343 Test: m Change-Id: I1c2ffe8d28ccf648d928ea59652c2d0070bf10eb
Diffstat (limited to 'java/java.go')
-rw-r--r--java/java.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/java/java.go b/java/java.go
index 52f3c11aa..d39c0d20c 100644
--- a/java/java.go
+++ b/java/java.go
@@ -1567,6 +1567,12 @@ func (j *Module) hasCode(ctx android.ModuleContext) bool {
return len(srcFiles) > 0 || len(ctx.GetDirectDepsWithTag(staticLibTag)) > 0
}
+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
+ return depTag == staticLibTag
+}
+
//
// Java libraries (.jar file)
//