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 <build_id> \
&& git diff HEAD^ -- fix_dependencies.mk \
&& m -j checkbuild
Change-Id: If546ecf7416580a01bde7b906976ada4b1145253
Merged-In: If546ecf7416580a01bde7b906976ada4b1145253
(manually cherry-picked from commit 358f25e97d5ffaa0d90dd57002c18ecc6bf7094d)
diff --git a/cmd/pom2mk/pom2mk.go b/cmd/pom2mk/pom2mk.go
index 8094160..a609860 100644
--- a/cmd/pom2mk/pom2mk.go
+++ b/cmd/pom2mk/pom2mk.go
@@ -160,6 +160,10 @@
// 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