summaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
author Alex Light <allight@google.com> 2017-10-26 09:46:21 -0700
committer Alex Light <allight@google.com> 2017-10-27 22:07:48 +0000
commit2423717a0ff73c053e57308163b028ccb5c49d78 (patch)
treebc7f6094cfeca3b571c124bc445580edac187eb1 /java/java.go
parent715d7110f7740c706f67d07263be14e88e2e5ee7 (diff)
Allow java_host_binary to be used with genrule.
This is done by implementing the HostToolPath interface for java Binary objects. Currently, in order for a java_binary_host to be used in this way the java_host_binary must include: compile_multilib: "first" Otherwise the genrule is unable to find the correct variant. Test: ./build_test.bash Test: Manual Bug: 68397812 Change-Id: I6849488dc13fa8c383df69d00f62ad815ec17876
Diffstat (limited to 'java/java.go')
-rw-r--r--java/java.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/java/java.go b/java/java.go
index f5035e7df..7ecf6720f 100644
--- a/java/java.go
+++ b/java/java.go
@@ -868,6 +868,10 @@ type Binary struct {
binaryFile android.OutputPath
}
+func (j *Binary) HostToolPath() android.OptionalPath {
+ return android.OptionalPathForPath(j.binaryFile)
+}
+
func (j *Binary) GenerateAndroidBuildActions(ctx android.ModuleContext) {
j.Library.GenerateAndroidBuildActions(ctx)