summaryrefslogtreecommitdiff
path: root/java/base.go
diff options
context:
space:
mode:
author Yu Liu <yudiliu@google.com> 2025-02-07 00:23:34 +0000
committer Yu Liu <yudiliu@google.com> 2025-02-13 02:09:19 +0000
commitf1806039ea089186042c01df1141633fc3cf7f5a (patch)
treed53e67139a2eff3c796a5a1c7eb75eda5b4bb698 /java/base.go
parentb58ccb466ea61f076fb71ce03a64b4ae660f7406 (diff)
Support DepIsInSameApex using provider.
Bug: 377723687 Test: Unit tests and compare the ninja and mk files generated. Change-Id: I8ec5e8a3a06d078602ebaa902cacb70987f1deda
Diffstat (limited to 'java/base.go')
-rw-r--r--java/base.go14
1 files changed, 11 insertions, 3 deletions
diff --git a/java/base.go b/java/base.go
index 3a435a173..730554896 100644
--- a/java/base.go
+++ b/java/base.go
@@ -377,7 +377,7 @@ func (e *embeddableInModuleAndImport) initModuleAndImport(module android.Module)
//
// This cannot implement OutgoingDepIsInSameApex(...) directly as that leads to ambiguity with
// the one provided by ApexModuleBase.
-func (e *embeddableInModuleAndImport) depIsInSameApex(tag blueprint.DependencyTag) bool {
+func depIsInSameApex(tag blueprint.DependencyTag) bool {
// dependencies other than the static linkage are all considered crossing APEX boundary
if tag == staticLibTag {
return true
@@ -2254,8 +2254,16 @@ func (j *Module) hasCode(ctx android.ModuleContext) bool {
}
// Implements android.ApexModule
-func (j *Module) OutgoingDepIsInSameApex(tag blueprint.DependencyTag) bool {
- return j.depIsInSameApex(tag)
+func (m *Module) GetDepInSameApexChecker() android.DepInSameApexChecker {
+ return JavaDepInSameApexChecker{}
+}
+
+type JavaDepInSameApexChecker struct {
+ android.BaseDepInSameApexChecker
+}
+
+func (m JavaDepInSameApexChecker) OutgoingDepIsInSameApex(tag blueprint.DependencyTag) bool {
+ return depIsInSameApex(tag)
}
// Implements android.ApexModule