summaryrefslogtreecommitdiff
path: root/java/jdeps.go
diff options
context:
space:
mode:
author Yike <yikezh@google.com> 2022-04-13 20:41:01 +0800
committer Yike <yikezh@google.com> 2022-04-18 10:23:28 +0800
commitf628202aabf55d989b6ab1a1ccb6a33967ec969e (patch)
treec0cdd7f4eb7c1aab0c3dfca9b69a09ade4c6bed6 /java/jdeps.go
parentfa8e9cc3a19c60e36945432fa8eece5a4a12c112 (diff)
Export Java library dependency information
Write `static_libs` and `libs` of Java library and Android app modules to module_bp_java_deps.json. This enables downstream tools to correctly set up the runtime environment. Note that while static libraries don't need to be on the Java classpath these modules could have non-static library dependencies that do need to be present. Test: m out/soong/module_bp_java_deps.json Bug: 227538646 Change-Id: I7c4aecb2fb03c890f0d2aaae80e619f6176809ef
Diffstat (limited to 'java/jdeps.go')
-rw-r--r--java/jdeps.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/java/jdeps.go b/java/jdeps.go
index eff9a3174..373433517 100644
--- a/java/jdeps.go
+++ b/java/jdeps.go
@@ -71,6 +71,8 @@ func (j *jdepsGeneratorSingleton) GenerateBuildActions(ctx android.SingletonCont
dpInfo.Jars = android.FirstUniqueStrings(dpInfo.Jars)
dpInfo.SrcJars = android.FirstUniqueStrings(dpInfo.SrcJars)
dpInfo.Paths = android.FirstUniqueStrings(dpInfo.Paths)
+ dpInfo.Static_libs = android.FirstUniqueStrings(dpInfo.Static_libs)
+ dpInfo.Libs = android.FirstUniqueStrings(dpInfo.Libs)
moduleInfos[name] = dpInfo
mkProvider, ok := module.(android.AndroidMkDataProvider)