aboutsummaryrefslogtreecommitdiff
path: root/java/device_host_converter.go
diff options
context:
space:
mode:
Diffstat (limited to 'java/device_host_converter.go')
-rw-r--r--java/device_host_converter.go21
1 files changed, 16 insertions, 5 deletions
diff --git a/java/device_host_converter.go b/java/device_host_converter.go
index 04def3e28..283d04598 100644
--- a/java/device_host_converter.go
+++ b/java/device_host_converter.go
@@ -102,7 +102,7 @@ func (d *DeviceHostConverter) GenerateAndroidBuildActions(ctx android.ModuleCont
var transitiveImplementationJars []depset.DepSet[android.Path]
var transitiveResourceJars []depset.DepSet[android.Path]
- ctx.VisitDirectDepsWithTag(deviceHostConverterDepTag, func(m android.Module) {
+ ctx.VisitDirectDepsProxyWithTag(deviceHostConverterDepTag, func(m android.ModuleProxy) {
if dep, ok := android.OtherModuleProvider(ctx, m, JavaInfoProvider); ok {
d.headerJars = append(d.headerJars, dep.HeaderJars...)
d.implementationJars = append(d.implementationJars, dep.ImplementationJars...)
@@ -158,6 +158,21 @@ func (d *DeviceHostConverter) GenerateAndroidBuildActions(ctx android.ModuleCont
setExtraJavaInfo(ctx, d, javaInfo)
android.SetProvider(ctx, JavaInfoProvider, javaInfo)
+ if ctx.Os() != android.Windows { // Make does not support Windows Java modules
+ if d.combinedImplementationJar != nil {
+ ctx.CheckbuildFile(d.combinedImplementationJar)
+ }
+ if d.combinedHeaderJar != nil {
+ ctx.CheckbuildFile(d.combinedHeaderJar)
+ }
+ }
+
+ moduleInfoJSON := ctx.ModuleInfoJSON()
+ moduleInfoJSON.Class = []string{"JAVA_LIBRARIES"}
+ if d.combinedImplementationJar != nil {
+ moduleInfoJSON.ClassesJar = []string{d.combinedImplementationJar.String()}
+ }
+ moduleInfoJSON.SystemSharedLibs = []string{"none"}
}
func (d *DeviceHostConverter) HeaderJars() android.Paths {
@@ -184,10 +199,6 @@ func (d *DeviceHostConverter) ClassLoaderContexts() dexpreopt.ClassLoaderContext
return nil
}
-func (d *DeviceHostConverter) JacocoReportClassesFile() android.Path {
- return nil
-}
-
func (d *DeviceHostConverter) AndroidMk() android.AndroidMkData {
return android.AndroidMkData{
Class: "JAVA_LIBRARIES",