summaryrefslogtreecommitdiff
path: root/java/sdk_library.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/sdk_library.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/sdk_library.go')
-rw-r--r--java/sdk_library.go28
1 files changed, 22 insertions, 6 deletions
diff --git a/java/sdk_library.go b/java/sdk_library.go
index b6bac2d96..fafb44801 100644
--- a/java/sdk_library.go
+++ b/java/sdk_library.go
@@ -1708,14 +1708,22 @@ func (module *SdkLibrary) compareAgainstLatestApi(apiScope *apiScope) bool {
}
// Implements android.ApexModule
-func (module *SdkLibrary) OutgoingDepIsInSameApex(depTag blueprint.DependencyTag) bool {
- if depTag == xmlPermissionsFileTag {
+func (m *SdkLibrary) GetDepInSameApexChecker() android.DepInSameApexChecker {
+ return SdkLibraryDepInSameApexChecker{}
+}
+
+type SdkLibraryDepInSameApexChecker struct {
+ android.BaseDepInSameApexChecker
+}
+
+func (m SdkLibraryDepInSameApexChecker) OutgoingDepIsInSameApex(tag blueprint.DependencyTag) bool {
+ if tag == xmlPermissionsFileTag {
return true
}
- if depTag == implLibraryTag {
+ if tag == implLibraryTag {
return true
}
- return module.Library.OutgoingDepIsInSameApex(depTag)
+ return depIsInSameApex(tag)
}
// Implements android.ApexModule
@@ -2126,8 +2134,16 @@ func (module *SdkLibraryImport) DepsMutator(ctx android.BottomUpMutatorContext)
var _ android.ApexModule = (*SdkLibraryImport)(nil)
// Implements android.ApexModule
-func (module *SdkLibraryImport) OutgoingDepIsInSameApex(depTag blueprint.DependencyTag) bool {
- if depTag == xmlPermissionsFileTag {
+func (m *SdkLibraryImport) GetDepInSameApexChecker() android.DepInSameApexChecker {
+ return SdkLibraryImportDepIsInSameApexChecker{}
+}
+
+type SdkLibraryImportDepIsInSameApexChecker struct {
+ android.BaseDepInSameApexChecker
+}
+
+func (m SdkLibraryImportDepIsInSameApexChecker) OutgoingDepIsInSameApex(tag blueprint.DependencyTag) bool {
+ if tag == xmlPermissionsFileTag {
return true
}