summaryrefslogtreecommitdiff
path: root/java/classpath_fragment.go
diff options
context:
space:
mode:
author Spandan Das <spandandas@google.com> 2024-11-21 23:45:51 +0000
committer Spandan Das <spandandas@google.com> 2024-11-22 00:46:00 +0000
commit33a291c0dca5e03a3d49f7ec4a37c60cdf4d110d (patch)
treea20b10655cd80e33b3d72151a020dbfcdffc3a5c /java/classpath_fragment.go
parent236944cec52287f803b169856c2c8b7395fbbb0a (diff)
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
Diffstat (limited to 'java/classpath_fragment.go')
-rw-r--r--java/classpath_fragment.go4
1 files changed, 4 insertions, 0 deletions
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{}{}