diff options
author | Colin Cross <ccross@android.com> | 2018-08-29 15:25:48 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2018-08-29 15:37:19 -0700 |
commit | 8a9900a75f091aa57d303e6483eb2c873b68b13a (patch) | |
tree | 7deb10e494973bc30d1cc73b99091ca178e1d911 /cmd | |
parent | 86bc9d46225fc1674cb73b93c4d19a705422ce18 (diff) | |
download | build_soong-8a9900a75f091aa57d303e6483eb2c873b68b13a.tar.gz build_soong-8a9900a75f091aa57d303e6483eb2c873b68b13a.tar.bz2 build_soong-8a9900a75f091aa57d303e6483eb2c873b68b13a.zip |
pom2bp: use java_import_host for host modules
java_library_host modules shouldn't depend on java_import modules.
Bug: 112707915
Test: (cd prebuilts/sdk/current/androidx && pom2bp -regen Android.bp)
Change-Id: Ia5ac353a696c9f51f1b50b334a327937ddcb47e7
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/pom2bp/pom2bp.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/pom2bp/pom2bp.go b/cmd/pom2bp/pom2bp.go index 7b071c05..a66a4244 100644 --- a/cmd/pom2bp/pom2bp.go +++ b/cmd/pom2bp/pom2bp.go @@ -293,7 +293,7 @@ func (p *Pom) ExtractMinSdkVersion() error { } var bpTemplate = template.Must(template.New("bp").Parse(` -{{if .IsAar}}android_library_import{{else}}java_import{{end}} { +{{if .IsAar}}android_library_import{{else if .IsDeviceModule}}java_import{{else}}java_import_host{{end}} { name: "{{.BpName}}-nodeps", {{if .IsAar}}aars{{else}}jars{{end}}: ["{{.ArtifactFile}}"], sdk_version: "{{.SdkVersion}}",{{if .IsAar}} @@ -304,7 +304,7 @@ var bpTemplate = template.Must(template.New("bp").Parse(` ],{{end}} } -{{if .IsAar}}android_library{{else}}{{if .IsDeviceModule}}java_library_static{{else}}java_library_host{{end}}{{end}} { +{{if .IsAar}}android_library{{else if .IsDeviceModule}}java_library_static{{else}}java_library_host{{end}} { name: "{{.BpName}}",{{if .IsDeviceModule}} sdk_version: "{{.SdkVersion}}",{{if .IsAar}} min_sdk_version: "{{.MinSdkVersion}}", |