From 48aa22380e7dd36a68f64da66c97c865d710e840 Mon Sep 17 00:00:00 2001 From: Inseob Kim Date: Wed, 11 Jan 2023 11:30:42 +0900 Subject: Consider only preferred modules for jdeps Bug: 263327259 Test: run atest and see modules to be built Change-Id: I208a07e2453b924f8af25db340d970ec039c5f32 --- java/jdeps.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'java/jdeps.go') 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 -- cgit v1.2.3-59-g8ed1b