Lines Matching full:pom
186 type Pom struct { struct
187 XMLName xml.Name `xml:"http://maven.apache.org/POM/4.0.0 project"`
202 func (p Pom) IsAar() bool { argument
206 func (p Pom) IsJar() bool { argument
210 func (p Pom) IsApk() bool { argument
214 func (p Pom) IsHostModule() bool { argument
218 func (p Pom) IsDeviceModule() bool { argument
222 func (p Pom) IsHostAndDeviceModule() bool { argument
226 func (p Pom) IsHostOnly() bool { argument
230 func (p Pom) ModuleType() string { argument
240 func (p Pom) BazelTargetType() string { argument
248 func (p Pom) ImportModuleType() string { argument
260 func (p Pom) BazelImportTargetType() string { argument
270 func (p Pom) ImportProperty() string { argument
280 func (p Pom) BazelImportProperty() string { argument
290 func (p Pom) BpName() string { argument
297 func (p Pom) BpJarDeps() []string { argument
301 func (p Pom) BpAarDeps() []string { argument
305 func (p Pom) BazelJarDeps() []string { argument
309 func (p Pom) BazelAarDeps() []string { argument
313 func (p Pom) BpExtraStaticLibs() []string { argument
317 func (p Pom) BpExtraLibs() []string { argument
321 func (p Pom) BpOptionalUsesLibs() []string { argument
327 func (p Pom) BpDeps(typeExt string, scopes []string) []string { argument
341 func (p Pom) BazelDeps(typeExt string, scopes []string) []string { argument
359 func InitRefreshMod(poms []*Pom) error { argument
374 func BazelifyExtraDeps(extraDeps ExtraDeps, modules map[string]*Pom) error { argument
388 func (p *Pom) GetBazelDepNames(modules map[string]*Pom) error { argument
399 func BpNameToBazelTarget(bpName string, modules map[string]*Pom) (string, error) { argument
403 // We've seen the POM for this dependency, it will be local to the output BUILD file
406 // we don't have the POM for this artifact, find and use the fully qualified target name.
424 func (p Pom) SdkVersion() string { argument
428 func (p Pom) DefaultMinSdkVersion() string { argument
432 func (p Pom) Jetifier() bool { argument
436 func (p *Pom) FixDeps(modules map[string]*Pom) { argument
440 // We've seen the POM for this dependency, use its packaging
444 // Dependency type was not specified and we don't have the POM
458 func (p *Pom) ExtractMinSdkVersion() error { argument
710 func parse(filename string) (*Pom, error) {
716 var pom Pom
717 err = xml.Unmarshal(data, &pom)
722 if useVersion != "" && pom.Version != useVersion {
726 if pom.Packaging == "" {
727 pom.Packaging = "jar"
730 pom.PomFile = filename
731 pom.ArtifactFile = strings.TrimSuffix(filename, ".pom") + "." + pom.Packaging
733 return &pom, nil
804 The tool will extract the necessary information from *.pom files to create an Android.bp whose
835 If the maven directory contains multiple versions of artifacts and their pom files,
843 The directory to search for *.pom files under.
916 if strings.HasSuffix(name, ".pom") {
931 fmt.Fprintln(os.Stderr, "Error: no *.pom files found under", dir)
937 poms := []*Pom{}
938 modules := make(map[string]*Pom)
941 pom, err := parse(filename)
947 if pom != nil {
948 key := pom.BpName()
954 fmt.Fprintln(os.Stderr, "Module", key, "defined twice:", old.PomFile, pom.PomFile)
958 poms = append(poms, pom)
959 modules[key] = pom
976 for _, pom := range poms {
977 if pom.IsAar() {
978 err := pom.ExtractMinSdkVersion()
980 fmt.Fprintf(os.Stderr, "Error reading manifest for %s: %s", pom.ArtifactFile, err)
984 pom.FixDeps(modules)
986 pom.GetBazelDepNames(modules)
1019 for _, pom := range poms {
1021 if staticDeps && !pom.IsApk() {
1022 err = depsTemplate.Execute(buf, pom)
1024 err = template.Execute(buf, pom)
1027 fmt.Fprintln(os.Stderr, "Error writing", pom.PomFile, pom.BpName(), err)