summaryrefslogtreecommitdiff
path: root/java/jdeps.go
diff options
context:
space:
mode:
author Inseob Kim <inseob@google.com> 2023-01-11 11:30:42 +0900
committer Inseob Kim <inseob@google.com> 2023-01-11 13:26:04 +0900
commit48aa22380e7dd36a68f64da66c97c865d710e840 (patch)
tree6c7f2befccddacd0bfb829b066ddcaa2c099ac5e /java/jdeps.go
parent3dfb939243b82c124d156fdc1f2881bb77a2850d (diff)
Consider only preferred modules for jdeps
Bug: 263327259 Test: run atest and see modules to be built Change-Id: I208a07e2453b924f8af25db340d970ec039c5f32
Diffstat (limited to 'java/jdeps.go')
-rw-r--r--java/jdeps.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/java/jdeps.go b/java/jdeps.go
index 373433517..a52b86708 100644
--- a/java/jdeps.go
+++ b/java/jdeps.go
@@ -52,6 +52,11 @@ func (j *jdepsGeneratorSingleton) GenerateBuildActions(ctx android.SingletonCont
return
}
+ // Prevent including both prebuilts and matching source modules when one replaces the other.
+ if !android.IsModulePreferred(module) {
+ return
+ }
+
ideInfoProvider, ok := module.(android.IDEInfo)
if !ok {
return