From 33a291c0dca5e03a3d49f7ec4a37c60cdf4d110d Mon Sep 17 00:00:00 2001 From: Spandan Das Date: Thu, 21 Nov 2024 23:45:51 +0000 Subject: Ignore missing apex boot jars if it does not exist And SOONG_ALLOW_MISSING_DEPENDENCIES is set. Bug: 380331248 Test: m nothing --no-skip-soong-tests Change-Id: Id2d0ec2050c625f060341a05e94e0b90910adcd5 --- java/classpath_fragment.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'java/classpath_fragment.go') diff --git a/java/classpath_fragment.go b/java/classpath_fragment.go index fdccd3a84..88a8fb80a 100644 --- a/java/classpath_fragment.go +++ b/java/classpath_fragment.go @@ -105,6 +105,10 @@ func gatherPossibleApexModuleNamesAndStems(ctx android.ModuleContext, contents [ set := map[string]struct{}{} for _, name := range contents { dep := ctx.GetDirectDepWithTag(name, tag) + if dep == nil && ctx.Config().AllowMissingDependencies() { + // Ignore apex boot jars from dexpreopt if it does not exist, and missing deps are allowed. + continue + } set[ModuleStemForDeapexing(dep)] = struct{}{} if m, ok := dep.(ModuleWithStem); ok { set[m.Stem()] = struct{}{} -- cgit v1.2.3-59-g8ed1b