Set LOCAL_PREBUILT_MODULE_FILE for hostdex modules

Java modules with hostdex: true have to manually create an extra
androidmk entry, which was missing LOCAL_PREBUILT_MODULE_FILE.

Test: m checkbuild
Change-Id: I0fb50196fe01ba9eb0c4aef446e7c8f28bbaec12
This commit is contained in:
Colin Cross 2019-01-14 14:13:51 -08:00
parent 1ad8142bd3
commit 462963b513
1 changed files with 5 additions and 0 deletions

View File

@ -75,6 +75,11 @@ func (library *Library) AndroidMk() android.AndroidMkData {
fmt.Fprintln(w, "LOCAL_MODULE := "+name+"-hostdex")
fmt.Fprintln(w, "LOCAL_IS_HOST_MODULE := true")
fmt.Fprintln(w, "LOCAL_MODULE_CLASS := JAVA_LIBRARIES")
if library.dexJarFile != nil {
fmt.Fprintln(w, "LOCAL_PREBUILT_MODULE_FILE :=", library.dexJarFile.String())
} else {
fmt.Fprintln(w, "LOCAL_PREBUILT_MODULE_FILE :=", library.implementationAndResourcesJar.String())
}
if library.installFile == nil {
fmt.Fprintln(w, "LOCAL_UNINSTALLABLE_MODULE := true")
}