Add -jetifier to pom2mk and pom2bp

Test: use pom2mk -jetifier to replace some hand-modified makefiles
Change-Id: I2a1988d0120fee1edf2d85c8b3294041840efe7c
diff --git a/cmd/pom2mk/pom2mk.go b/cmd/pom2mk/pom2mk.go
index 94e5619..b347155 100644
--- a/cmd/pom2mk/pom2mk.go
+++ b/cmd/pom2mk/pom2mk.go
@@ -104,6 +104,7 @@
 var sdkVersion string
 var useVersion string
 var staticDeps bool
+var jetifier bool
 
 func InList(s string, list []string) bool {
 	for _, l := range list {
@@ -195,6 +196,10 @@
 	return sdkVersion
 }
 
+func (p Pom) Jetifier() bool {
+	return jetifier
+}
+
 func (p *Pom) FixDeps(modules map[string]*Pom) {
 	for _, d := range p.Dependencies {
 		if d.Type == "" {
@@ -229,6 +234,7 @@
   {{.}}{{end}}
 LOCAL_STATIC_ANDROID_LIBRARIES :={{range .MkAarDeps}} \
   {{.}}{{end}}
+LOCAL_JETIFIER_ENABLED := {{if .Jetifier}}true{{end}}
 include $(BUILD_PREBUILT)
 `))
 
@@ -367,6 +373,8 @@
      -use-version can be used to only write makefiles for a specific version of those artifacts.
   -static-deps
      Whether to statically include direct dependencies.
+  -jetifier
+     Enable jetifier in order to use androidx
   <dir>
      The directory to search for *.pom files under.
      The makefile is written to stdout, to be put in the current directory (often as Android.mk)
@@ -383,6 +391,7 @@
 	flag.StringVar(&sdkVersion, "sdk-version", "", "What to write to LOCAL_SDK_VERSION")
 	flag.StringVar(&useVersion, "use-version", "", "Only read artifacts of a specific version")
 	flag.BoolVar(&staticDeps, "static-deps", false, "Statically include direct dependencies")
+	flag.BoolVar(&jetifier, "jetifier", false, "Enable jetifier in order to use androidx")
 	flag.StringVar(&regen, "regen", "", "Rewrite specified file")
 	flag.Parse()