summaryrefslogtreecommitdiff
path: root/java/base.go
diff options
context:
space:
mode:
Diffstat (limited to 'java/base.go')
-rw-r--r--java/base.go14
1 files changed, 10 insertions, 4 deletions
diff --git a/java/base.go b/java/base.go
index 02dc3e35b..be12ffd62 100644
--- a/java/base.go
+++ b/java/base.go
@@ -550,6 +550,10 @@ type Module struct {
// java_aconfig_library or java_library modules that are statically linked
// to this module. Does not contain cache files from all transitive dependencies.
aconfigCacheFiles android.Paths
+
+ // List of soong module dependencies required to compile the current module.
+ // This information is printed out to `Dependencies` field in module_bp_java_deps.json
+ compileDepNames []string
}
var _ android.InstallableModule = (*Module)(nil)
@@ -2061,10 +2065,7 @@ func (j *Module) IDEInfo(dpInfo *android.IdeInfo) {
}
func (j *Module) CompilerDeps() []string {
- jdeps := []string{}
- jdeps = append(jdeps, j.properties.Libs...)
- jdeps = append(jdeps, j.properties.Static_libs...)
- return jdeps
+ return j.compileDepNames
}
func (j *Module) hasCode(ctx android.ModuleContext) bool {
@@ -2408,6 +2409,11 @@ func (j *Module) collectDeps(ctx android.ModuleContext) deps {
}
}
+ if android.InList(tag, compileDependencyTags) {
+ // Add the dependency name to compileDepNames so that it can be recorded in module_bp_java_deps.json
+ j.compileDepNames = append(j.compileDepNames, otherName)
+ }
+
addCLCFromDep(ctx, module, j.classLoaderContexts)
addMissingOptionalUsesLibsFromDep(ctx, module, &j.usesLibrary)
})