From f1806039ea089186042c01df1141633fc3cf7f5a Mon Sep 17 00:00:00 2001 From: Yu Liu Date: Fri, 7 Feb 2025 00:23:34 +0000 Subject: Support DepIsInSameApex using provider. Bug: 377723687 Test: Unit tests and compare the ninja and mk files generated. Change-Id: I8ec5e8a3a06d078602ebaa902cacb70987f1deda --- java/bootclasspath_fragment.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'java/bootclasspath_fragment.go') diff --git a/java/bootclasspath_fragment.go b/java/bootclasspath_fragment.go index 65a05798a..8383a5a1e 100644 --- a/java/bootclasspath_fragment.go +++ b/java/bootclasspath_fragment.go @@ -410,7 +410,15 @@ func (i BootclasspathFragmentApexContentInfo) ProfileInstallPathInApex() string return i.profileInstallPathInApex } -func (b *BootclasspathFragmentModule) OutgoingDepIsInSameApex(tag blueprint.DependencyTag) bool { +func (m *BootclasspathFragmentModule) GetDepInSameApexChecker() android.DepInSameApexChecker { + return BootclasspathFragmentDepInSameApexChecker{} +} + +type BootclasspathFragmentDepInSameApexChecker struct { + android.BaseDepInSameApexChecker +} + +func (b BootclasspathFragmentDepInSameApexChecker) OutgoingDepIsInSameApex(tag blueprint.DependencyTag) bool { // If the module is a default module, do not check the tag if tag == android.DefaultsDepTag { return true @@ -443,7 +451,7 @@ func (b *BootclasspathFragmentModule) OutgoingDepIsInSameApex(tag blueprint.Depe if _, ok := tag.(hiddenAPIStubsDependencyTag); ok { return false } - panic(fmt.Errorf("boot_image module %q should not have a dependency tag %s", b, android.PrettyPrintTag(tag))) + panic(fmt.Errorf("boot_image module should not have a dependency tag %s", android.PrettyPrintTag(tag))) } func (b *BootclasspathFragmentModule) ShouldSupportSdkVersion(ctx android.BaseModuleContext, sdkVersion android.ApiLevel) error { -- cgit v1.2.3-59-g8ed1b