From 358f25e97d5ffaa0d90dd57002c18ecc6bf7094d Mon Sep 17 00:00:00 2001 From: Jeff Gaston Date: Mon, 23 Apr 2018 15:32:19 -0400 Subject: [PATCH] pom2mk to include extra-deps as top-level deps too Specifically, the use case is android-support-car requires some stubs that don't have a Maven pom. So those stubs can't easily be listed as a dependency in the pom. However, we do want the dependency to exist when importing to Make and detected by extract_deps.py Bug: 76692459 Test: m -j blueprint_tools \ && update_prebuilts.py -s \ && git diff HEAD^ -- fix_dependencies.mk \ && m -j checkbuild Change-Id: If546ecf7416580a01bde7b906976ada4b1145253 --- cmd/pom2mk/pom2mk.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/pom2mk/pom2mk.go b/cmd/pom2mk/pom2mk.go index b4659f77f..a635586ee 100644 --- a/cmd/pom2mk/pom2mk.go +++ b/cmd/pom2mk/pom2mk.go @@ -160,6 +160,10 @@ func (p Pom) MkAarDeps() []string { // method are formatted as Make targets, e.g. run through MavenToMk rules. func (p Pom) MkDeps(typeExt string, scopes []string) []string { var ret []string + if typeExt == "jar" { + // all top-level extra deps are assumed to be of type "jar" until we add syntax to specify other types + ret = append(ret, extraDeps[p.MkName()]...) + } for _, d := range p.Dependencies { if d.Type != typeExt || !InList(d.Scope, scopes) { continue