summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--java/androidmk.go1
-rw-r--r--java/base.go3
-rw-r--r--java/java.go3
3 files changed, 6 insertions, 1 deletions
diff --git a/java/androidmk.go b/java/androidmk.go
index 35b4c8e19..4c115d58c 100644
--- a/java/androidmk.go
+++ b/java/androidmk.go
@@ -47,6 +47,7 @@ func (library *Library) AndroidMkEntriesHostDex() android.AndroidMkEntries {
if library.dexJarFile.IsSet() {
entries.SetPath("LOCAL_SOONG_DEX_JAR", library.dexJarFile.Path())
}
+ entries.SetPath("LOCAL_SOONG_INSTALLED_MODULE", library.hostdexInstallFile)
entries.SetPath("LOCAL_SOONG_HEADER_JAR", library.headerJarFile)
entries.SetPath("LOCAL_SOONG_CLASSES_JAR", library.implementationAndResourcesJar)
entries.SetString("LOCAL_MODULE_STEM", library.Stem()+"-hostdex")
diff --git a/java/base.go b/java/base.go
index 859baaff7..6930bcd17 100644
--- a/java/base.go
+++ b/java/base.go
@@ -407,6 +407,9 @@ type Module struct {
// installed file for binary dependency
installFile android.Path
+ // installed file for hostdex copy
+ hostdexInstallFile android.InstallPath
+
// list of .java files and srcjars that was passed to javac
compiledJavaSrcs android.Paths
compiledSrcJars android.Paths
diff --git a/java/java.go b/java/java.go
index 3bb9a925b..2f9e03a80 100644
--- a/java/java.go
+++ b/java/java.go
@@ -571,7 +571,8 @@ func (j *Library) GenerateAndroidBuildActions(ctx android.ModuleContext) {
}
hostDexNeeded := Bool(j.deviceProperties.Hostdex) && !ctx.Host()
if hostDexNeeded {
- ctx.InstallFile(android.PathForHostDexInstall(ctx, "framework"),
+ j.hostdexInstallFile = ctx.InstallFile(
+ android.PathForHostDexInstall(ctx, "framework"),
j.Stem()+"-hostdex.jar", j.outputFile)
}
var installDir android.InstallPath