diff options
author | Colin Cross <ccross@android.com> | 2019-04-24 13:41:45 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2019-04-26 11:13:30 -0700 |
commit | 363360c963116df431da33d45b1a2b7abab64c28 (patch) | |
tree | ec1939d68d0f36ddf12a2ee7a1a6acb92925c417 /java | |
parent | a25a2779c64f310609fae84adc990ce126ab0e8b (diff) | |
download | build_soong-363360c963116df431da33d45b1a2b7abab64c28.tar.gz build_soong-363360c963116df431da33d45b1a2b7abab64c28.tar.bz2 build_soong-363360c963116df431da33d45b1a2b7abab64c28.zip |
Support target.hostdex.required
Hostdex modules sometimes need extra required modules, add
target.hostdex.required.
Bug: 131167818
Test: manual
Change-Id: I599f3499f0b738556baeb27185371a42b4c2701b
Merged-In: I599f3499f0b738556baeb27185371a42b4c2701b
(cherry picked from commit 7f87f4fdeb30f612d74001acb26c466cbb452467)
Diffstat (limited to 'java')
-rw-r--r-- | java/androidmk.go | 3 | ||||
-rw-r--r-- | java/java.go | 7 |
2 files changed, 10 insertions, 0 deletions
diff --git a/java/androidmk.go b/java/androidmk.go index 6ec72e03..7a939e84 100644 --- a/java/androidmk.go +++ b/java/androidmk.go @@ -39,6 +39,9 @@ func (library *Library) AndroidMkHostDex(w io.Writer, name string, data android. fmt.Fprintln(w, "LOCAL_SOONG_HEADER_JAR :=", library.headerJarFile.String()) fmt.Fprintln(w, "LOCAL_SOONG_CLASSES_JAR :=", library.implementationAndResourcesJar.String()) fmt.Fprintln(w, "LOCAL_REQUIRED_MODULES := "+strings.Join(data.Required, " ")) + if r := library.deviceProperties.Target.Hostdex.Required; len(r) > 0 { + fmt.Fprintln(w, "LOCAL_REQUIRED_MODULES +=", strings.Join(r, " ")) + } fmt.Fprintln(w, "include $(BUILD_SYSTEM)/soong_java_prebuilt.mk") } } diff --git a/java/java.go b/java/java.go index b0ad8c26..bf738c4d 100644 --- a/java/java.go +++ b/java/java.go @@ -221,6 +221,13 @@ type CompilerDeviceProperties struct { // If true, export a copy of the module as a -hostdex module for host testing. Hostdex *bool + Target struct { + Hostdex struct { + // Additional required dependencies to add to -hostdex modules. + Required []string + } + } + // If set to true, compile dex regardless of installable. Defaults to false. Compile_dex *bool |