aboutsummaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
Diffstat (limited to 'java/java.go')
-rw-r--r--java/java.go14
1 files changed, 12 insertions, 2 deletions
diff --git a/java/java.go b/java/java.go
index d6c759b45..47dd95724 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
@@ -1246,9 +1253,9 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars ...android.Path
// merge implementation jar with resources if necessary
implementationAndResourcesJar := outputFile
if j.resourceJar != nil {
- jars := android.Paths{implementationAndResourcesJar, j.resourceJar}
+ jars := android.Paths{j.resourceJar, implementationAndResourcesJar}
combinedJar := android.PathForModuleOut(ctx, "withres", jarName)
- TransformJarsToJar(ctx, combinedJar, "for resources", jars, android.OptionalPath{},
+ TransformJarsToJar(ctx, combinedJar, "for resources", jars, manifest,
false, nil, nil)
implementationAndResourcesJar = combinedJar
}
@@ -1632,6 +1639,9 @@ func TestHelperLibraryFactory() android.Module {
&module.Module.protoProperties,
&module.testHelperLibraryProperties)
+ module.Module.properties.Installable = proptools.BoolPtr(true)
+ module.Module.dexpreopter.isTest = true
+
InitJavaModule(module, android.HostAndDeviceSupported)
return module
}