Support target.hostdex.required

Hostdex modules sometimes need extra required modules, add
target.hostdex.required.

Bug: 131167818
Test: manual
Change-Id: I599f3499f0b738556baeb27185371a42b4c2701b
diff --git a/java/java.go b/java/java.go
index d6c759b..be0f4d2 100644
--- a/java/java.go
+++ b/java/java.go
@@ -221,6 +221,13 @@
 	// 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