From d4cbf340322253ab021dbfe264e0e1a1a03dfa2d Mon Sep 17 00:00:00 2001 From: Jiyong Park Date: Tue, 23 Feb 2021 11:14:31 +0900 Subject: Fix infinite recursion when printing unrecognized linktype Bug: N/A Test: remove some cases from String() so that some linktypes go to the default path. Then run m nothing. No infinite recursion. Error is correctly shown. PANIC=String method: unrecognized linktype: 5 Change-Id: I424755bc89871fc2144ff22d6391f57157cd434d Change-Id: Ice791025dc50f44ffabd1050bafc5ea35023d32c --- java/java.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'java/java.go') diff --git a/java/java.go b/java/java.go index dbfad029b..78cd362d8 100644 --- a/java/java.go +++ b/java/java.go @@ -1038,7 +1038,7 @@ func (lt linkType) String() string { case javaPlatform: return "private API" default: - panic(fmt.Errorf("unrecognized linktype: %v", lt)) + panic(fmt.Errorf("unrecognized linktype: %d", lt)) } } -- cgit v1.2.3 From 069b75077a072907937f3df00ab2058d69711bd5 Mon Sep 17 00:00:00 2001 From: Julien Desprez Date: Fri, 19 Feb 2021 14:56:28 -0800 Subject: Attempt to run all java_test_host that look unit tests Currently includes some heuristic for the first round of onboarding. Test: presubmit Bug: 180736967 Change-Id: I220551549ed3c1468390655cb911f3b8c0f8880d --- java/java.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'java/java.go') diff --git a/java/java.go b/java/java.go index dbfad029b..f0eeb29c8 100644 --- a/java/java.go +++ b/java/java.go @@ -2505,6 +2505,11 @@ func (j *TestHost) DepsMutator(ctx android.BottomUpMutatorContext) { } func (j *Test) GenerateAndroidBuildActions(ctx android.ModuleContext) { + if j.testProperties.Test_options.Unit_test == nil && ctx.Host() { + // TODO(b/): Clean temporary heuristic to avoid unexpected onboarding. + defaultUnitTest := !inList("tradefed", j.properties.Static_libs) && !inList("tradefed", j.properties.Libs) && !inList("cts", j.testProperties.Test_suites) && !inList("robolectric-host-android_all", j.properties.Static_libs) && !inList("robolectric-host-android_all", j.properties.Libs) + j.testProperties.Test_options.Unit_test = proptools.BoolPtr(defaultUnitTest) + } j.testConfig = tradefed.AutoGenJavaTestConfig(ctx, j.testProperties.Test_config, j.testProperties.Test_config_template, j.testProperties.Test_suites, j.testProperties.Auto_gen_config, j.testProperties.Test_options.Unit_test) @@ -2665,6 +2670,7 @@ func TestHostFactory() android.Module { module.Module.properties.Installable = proptools.BoolPtr(true) InitJavaModuleMultiTargets(module, android.HostSupported) + return module } -- cgit v1.2.3 From b014f0787edaa598e4d7186fc174c28b0091ed3a Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Fri, 26 Feb 2021 14:54:36 -0800 Subject: Propagate java resources in apps with no code Use the java resources jar as the dex jar when building apps that have no code. Also remove maybeStrippedDexJar, the dex jar is never stripped now. Fixes: 176305357 Test: TestAppJavaResources Change-Id: Ic8b1165bd35d71237d307e7f5f895764e203a10d --- java/java.go | 80 +++++++++++++++++++++++++++++------------------------------- 1 file changed, 39 insertions(+), 41 deletions(-) (limited to 'java/java.go') diff --git a/java/java.go b/java/java.go index 78cd362d8..698c5b915 100644 --- a/java/java.go +++ b/java/java.go @@ -434,9 +434,6 @@ type Module struct { // output file containing classes.dex and resources dexJarFile android.Path - // output file that contains classes.dex if it should be in the output file - maybeStrippedDexJarFile android.Path - // output file containing uninstrumented classes that will be instrumented by jacoco jacocoReportClassesFile android.Path @@ -1818,46 +1815,50 @@ func (j *Module) compile(ctx android.ModuleContext, aaptSrcJar android.Path) { } } - if ctx.Device() && j.hasCode(ctx) && - (Bool(j.properties.Installable) || Bool(j.dexProperties.Compile_dex)) { - if j.shouldInstrumentStatic(ctx) { - j.dexer.extraProguardFlagFiles = append(j.dexer.extraProguardFlagFiles, - android.PathForSource(ctx, "build/make/core/proguard.jacoco.flags")) - } - // Dex compilation - var dexOutputFile android.OutputPath - dexOutputFile = j.dexer.compileDex(ctx, flags, j.minSdkVersion(), outputFile, jarName) - if ctx.Failed() { - return - } + if ctx.Device() && (Bool(j.properties.Installable) || Bool(j.dexProperties.Compile_dex)) { + if j.hasCode(ctx) { + if j.shouldInstrumentStatic(ctx) { + j.dexer.extraProguardFlagFiles = append(j.dexer.extraProguardFlagFiles, + android.PathForSource(ctx, "build/make/core/proguard.jacoco.flags")) + } + // Dex compilation + var dexOutputFile android.OutputPath + dexOutputFile = j.dexer.compileDex(ctx, flags, j.minSdkVersion(), outputFile, jarName) + if ctx.Failed() { + return + } - // Hidden API CSV generation and dex encoding - dexOutputFile = j.hiddenAPIExtractAndEncode(ctx, dexOutputFile, j.implementationJarFile, - proptools.Bool(j.dexProperties.Uncompress_dex)) + // Hidden API CSV generation and dex encoding + dexOutputFile = j.hiddenAPIExtractAndEncode(ctx, dexOutputFile, j.implementationJarFile, + proptools.Bool(j.dexProperties.Uncompress_dex)) - // merge dex jar with resources if necessary - if j.resourceJar != nil { - jars := android.Paths{dexOutputFile, j.resourceJar} - combinedJar := android.PathForModuleOut(ctx, "dex-withres", jarName).OutputPath - TransformJarsToJar(ctx, combinedJar, "for dex resources", jars, android.OptionalPath{}, - false, nil, nil) - if *j.dexProperties.Uncompress_dex { - combinedAlignedJar := android.PathForModuleOut(ctx, "dex-withres-aligned", jarName).OutputPath - TransformZipAlign(ctx, combinedAlignedJar, combinedJar) - dexOutputFile = combinedAlignedJar - } else { - dexOutputFile = combinedJar + // merge dex jar with resources if necessary + if j.resourceJar != nil { + jars := android.Paths{dexOutputFile, j.resourceJar} + combinedJar := android.PathForModuleOut(ctx, "dex-withres", jarName).OutputPath + TransformJarsToJar(ctx, combinedJar, "for dex resources", jars, android.OptionalPath{}, + false, nil, nil) + if *j.dexProperties.Uncompress_dex { + combinedAlignedJar := android.PathForModuleOut(ctx, "dex-withres-aligned", jarName).OutputPath + TransformZipAlign(ctx, combinedAlignedJar, combinedJar) + dexOutputFile = combinedAlignedJar + } else { + dexOutputFile = combinedJar + } } - } - j.dexJarFile = dexOutputFile - - // Dexpreopting - j.dexpreopt(ctx, dexOutputFile) + j.dexJarFile = dexOutputFile - j.maybeStrippedDexJarFile = dexOutputFile + // Dexpreopting + j.dexpreopt(ctx, dexOutputFile) - outputFile = dexOutputFile + outputFile = dexOutputFile + } else { + // There is no code to compile into a dex jar, make sure the resources are propagated + // to the APK if this is an app. + outputFile = implementationAndResourcesJar + j.dexJarFile = j.resourceJar + } if ctx.Failed() { return @@ -3183,8 +3184,7 @@ type DexImport struct { properties DexImportProperties - dexJarFile android.Path - maybeStrippedDexJarFile android.Path + dexJarFile android.Path dexpreopter @@ -3271,8 +3271,6 @@ func (j *DexImport) GenerateAndroidBuildActions(ctx android.ModuleContext) { j.dexpreopt(ctx, dexOutputFile) - j.maybeStrippedDexJarFile = dexOutputFile - if apexInfo.IsForPlatform() { ctx.InstallFile(android.PathForModuleInstall(ctx, "framework"), j.Stem()+".jar", dexOutputFile) -- cgit v1.2.3 From 75ce9eccf3651991ccd2897bba03b8a9bba9b733 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Fri, 26 Feb 2021 16:20:32 -0800 Subject: Remove global state from sysprop libraries Sysprop libraries use a global list to rewrite dependencies from implementation libraries to public stub libraries when appropriate. Remove the global list, and instead add a dependency from the implementation to the public stub that forwards the JavaInfo. Bug: 181367697 Test: sysprop_test.go Change-Id: Ia7995feb3c079ca9bb6a403daaae3e3329fd7f6a --- java/java.go | 115 ++++++++++++++++++++++++++++++++--------------------------- 1 file changed, 62 insertions(+), 53 deletions(-) (limited to 'java/java.go') diff --git a/java/java.go b/java/java.go index 698c5b915..e471f0de6 100644 --- a/java/java.go +++ b/java/java.go @@ -370,6 +370,10 @@ type CompilerDeviceProperties struct { // If true, generate the signature file of APK Signing Scheme V4, along side the signed APK file. // Defaults to false. V4_signature *bool + + // Only for libraries created by a sysprop_library module, SyspropPublicStub is the name of the + // public stubs library. + SyspropPublicStub string `blueprint:"mutated"` } // Functionality common to Module and Import @@ -580,6 +584,16 @@ type JavaInfo struct { var JavaInfoProvider = blueprint.NewProvider(JavaInfo{}) +// SyspropPublicStubInfo contains info about the sysprop public stub library that corresponds to +// the sysprop implementation library. +type SyspropPublicStubInfo struct { + // JavaInfo is the JavaInfoProvider of the sysprop public stub library that corresponds to + // the sysprop implementation library. + JavaInfo JavaInfo +} + +var SyspropPublicStubInfoProvider = blueprint.NewProvider(SyspropPublicStubInfo{}) + // Methods that need to be implemented for a module that is added to apex java_libs property. type ApexDependency interface { HeaderJars() android.Paths @@ -649,29 +663,30 @@ func IsJniDepTag(depTag blueprint.DependencyTag) bool { } var ( - dataNativeBinsTag = dependencyTag{name: "dataNativeBins"} - staticLibTag = dependencyTag{name: "staticlib"} - libTag = dependencyTag{name: "javalib"} - java9LibTag = dependencyTag{name: "java9lib"} - pluginTag = dependencyTag{name: "plugin"} - errorpronePluginTag = dependencyTag{name: "errorprone-plugin"} - exportedPluginTag = dependencyTag{name: "exported-plugin"} - bootClasspathTag = dependencyTag{name: "bootclasspath"} - systemModulesTag = dependencyTag{name: "system modules"} - frameworkResTag = dependencyTag{name: "framework-res"} - kotlinStdlibTag = dependencyTag{name: "kotlin-stdlib"} - kotlinAnnotationsTag = dependencyTag{name: "kotlin-annotations"} - proguardRaiseTag = dependencyTag{name: "proguard-raise"} - certificateTag = dependencyTag{name: "certificate"} - instrumentationForTag = dependencyTag{name: "instrumentation_for"} - extraLintCheckTag = dependencyTag{name: "extra-lint-check"} - jniLibTag = dependencyTag{name: "jnilib"} - jniInstallTag = installDependencyTag{name: "jni install"} - binaryInstallTag = installDependencyTag{name: "binary install"} - usesLibTag = makeUsesLibraryDependencyTag(dexpreopt.AnySdkVersion) - usesLibCompat28Tag = makeUsesLibraryDependencyTag(28) - usesLibCompat29Tag = makeUsesLibraryDependencyTag(29) - usesLibCompat30Tag = makeUsesLibraryDependencyTag(30) + dataNativeBinsTag = dependencyTag{name: "dataNativeBins"} + staticLibTag = dependencyTag{name: "staticlib"} + libTag = dependencyTag{name: "javalib"} + java9LibTag = dependencyTag{name: "java9lib"} + pluginTag = dependencyTag{name: "plugin"} + errorpronePluginTag = dependencyTag{name: "errorprone-plugin"} + exportedPluginTag = dependencyTag{name: "exported-plugin"} + bootClasspathTag = dependencyTag{name: "bootclasspath"} + systemModulesTag = dependencyTag{name: "system modules"} + frameworkResTag = dependencyTag{name: "framework-res"} + kotlinStdlibTag = dependencyTag{name: "kotlin-stdlib"} + kotlinAnnotationsTag = dependencyTag{name: "kotlin-annotations"} + proguardRaiseTag = dependencyTag{name: "proguard-raise"} + certificateTag = dependencyTag{name: "certificate"} + instrumentationForTag = dependencyTag{name: "instrumentation_for"} + extraLintCheckTag = dependencyTag{name: "extra-lint-check"} + jniLibTag = dependencyTag{name: "jnilib"} + syspropPublicStubDepTag = dependencyTag{name: "sysprop public stub"} + jniInstallTag = installDependencyTag{name: "jni install"} + binaryInstallTag = installDependencyTag{name: "binary install"} + usesLibTag = makeUsesLibraryDependencyTag(dexpreopt.AnySdkVersion) + usesLibCompat28Tag = makeUsesLibraryDependencyTag(28) + usesLibCompat29Tag = makeUsesLibraryDependencyTag(29) + usesLibCompat30Tag = makeUsesLibraryDependencyTag(30) ) func IsLibDepTag(depTag blueprint.DependencyTag) bool { @@ -810,35 +825,17 @@ func (j *Module) deps(ctx android.BottomUpMutatorContext) { j.linter.deps(ctx) sdkDeps(ctx, sdkContext(j), j.dexer) - } - - syspropPublicStubs := syspropPublicStubs(ctx.Config()) - - // rewriteSyspropLibs validates if a java module can link against platform's sysprop_library, - // and redirects dependency to public stub depending on the link type. - rewriteSyspropLibs := func(libs []string, prop string) []string { - // make a copy - ret := android.CopyOf(libs) - - for idx, lib := range libs { - stub, ok := syspropPublicStubs[lib] - - if !ok { - continue - } - linkType, _ := j.getLinkType(ctx.ModuleName()) - // only platform modules can use internal props - if linkType != javaPlatform { - ret[idx] = stub - } + if j.deviceProperties.SyspropPublicStub != "" { + // This is a sysprop implementation library that has a corresponding sysprop public + // stubs library, and a dependency on it so that dependencies on the implementation can + // be forwarded to the public stubs library when necessary. + ctx.AddVariationDependencies(nil, syspropPublicStubDepTag, j.deviceProperties.SyspropPublicStub) } - - return ret } - libDeps := ctx.AddVariationDependencies(nil, libTag, rewriteSyspropLibs(j.properties.Libs, "libs")...) - ctx.AddVariationDependencies(nil, staticLibTag, rewriteSyspropLibs(j.properties.Static_libs, "static_libs")...) + libDeps := ctx.AddVariationDependencies(nil, libTag, j.properties.Libs...) + ctx.AddVariationDependencies(nil, staticLibTag, j.properties.Static_libs...) // Add dependency on libraries that provide additional hidden api annotations. ctx.AddVariationDependencies(nil, hiddenApiAnnotationsTag, j.properties.Hiddenapi_additional_annotations...) @@ -853,15 +850,11 @@ func (j *Module) deps(ctx android.BottomUpMutatorContext) { // if true, enable enforcement // PRODUCT_INTER_PARTITION_JAVA_LIBRARY_ALLOWLIST // exception list of java_library names to allow inter-partition dependency - for idx, lib := range j.properties.Libs { + for idx := range j.properties.Libs { if libDeps[idx] == nil { continue } - if _, ok := syspropPublicStubs[lib]; ok { - continue - } - if javaDep, ok := libDeps[idx].(javaSdkLibraryEnforceContext); ok { // java_sdk_library is always allowed at inter-partition dependency. // So, skip check. @@ -1131,6 +1124,8 @@ func (j *Module) collectDeps(ctx android.ModuleContext) deps { } } + linkType, _ := j.getLinkType(ctx.ModuleName()) + ctx.VisitDirectDeps(func(module android.Module) { otherName := ctx.OtherModuleName(module) tag := ctx.OtherModuleDependencyTag(module) @@ -1153,6 +1148,14 @@ func (j *Module) collectDeps(ctx android.ModuleContext) deps { } } else if ctx.OtherModuleHasProvider(module, JavaInfoProvider) { dep := ctx.OtherModuleProvider(module, JavaInfoProvider).(JavaInfo) + if linkType != javaPlatform && + ctx.OtherModuleHasProvider(module, SyspropPublicStubInfoProvider) { + // dep is a sysprop implementation library, but this module is not linking against + // the platform, so it gets the sysprop public stubs library instead. Replace + // dep with the JavaInfo from the SyspropPublicStubInfoProvider. + syspropDep := ctx.OtherModuleProvider(module, SyspropPublicStubInfoProvider).(SyspropPublicStubInfo) + dep = syspropDep.JavaInfo + } switch tag { case bootClasspathTag: deps.bootClasspath = append(deps.bootClasspath, dep.HeaderJars...) @@ -1211,6 +1214,12 @@ func (j *Module) collectDeps(ctx android.ModuleContext) deps { deps.kotlinStdlib = append(deps.kotlinStdlib, dep.HeaderJars...) case kotlinAnnotationsTag: deps.kotlinAnnotations = dep.HeaderJars + case syspropPublicStubDepTag: + // This is a sysprop implementation library, forward the JavaInfoProvider from + // the corresponding sysprop public stub library as SyspropPublicStubInfoProvider. + ctx.SetProvider(SyspropPublicStubInfoProvider, SyspropPublicStubInfo{ + JavaInfo: dep, + }) } } else if dep, ok := module.(android.SourceFileProducer); ok { switch tag { -- cgit v1.2.3 From 1ab84fa433b0094c459d4dd96da33e36e27a30c3 Mon Sep 17 00:00:00 2001 From: Julien Desprez Date: Thu, 4 Mar 2021 21:08:36 +0000 Subject: Revert "Attempt to run all java_test_host that look unit tests" Revert submission 1597083-java_test_host_default Reason for revert: Getting ready for b/181888225 just in case Reverted Changes: I220551549:Attempt to run all java_test_host that look unit t... I29dbbbf46:Exclude some tests for java_test_host onboarding Change-Id: Iaa89f9b7e9ad72ed962cef285c70a6263e63ffd5 --- java/java.go | 6 ------ 1 file changed, 6 deletions(-) (limited to 'java/java.go') diff --git a/java/java.go b/java/java.go index f0eeb29c8..dbfad029b 100644 --- a/java/java.go +++ b/java/java.go @@ -2505,11 +2505,6 @@ func (j *TestHost) DepsMutator(ctx android.BottomUpMutatorContext) { } func (j *Test) GenerateAndroidBuildActions(ctx android.ModuleContext) { - if j.testProperties.Test_options.Unit_test == nil && ctx.Host() { - // TODO(b/): Clean temporary heuristic to avoid unexpected onboarding. - defaultUnitTest := !inList("tradefed", j.properties.Static_libs) && !inList("tradefed", j.properties.Libs) && !inList("cts", j.testProperties.Test_suites) && !inList("robolectric-host-android_all", j.properties.Static_libs) && !inList("robolectric-host-android_all", j.properties.Libs) - j.testProperties.Test_options.Unit_test = proptools.BoolPtr(defaultUnitTest) - } j.testConfig = tradefed.AutoGenJavaTestConfig(ctx, j.testProperties.Test_config, j.testProperties.Test_config_template, j.testProperties.Test_suites, j.testProperties.Auto_gen_config, j.testProperties.Test_options.Unit_test) @@ -2670,7 +2665,6 @@ func TestHostFactory() android.Module { module.Module.properties.Installable = proptools.BoolPtr(true) InitJavaModuleMultiTargets(module, android.HostSupported) - return module } -- cgit v1.2.3 From 62751102a9b1a100f70c140da7761ab808fd3747 Mon Sep 17 00:00:00 2001 From: Jaewoong Jung Date: Thu, 4 Mar 2021 16:03:57 -0800 Subject: Clear remains of java.Dependency interface. Test: TreeHugger Change-Id: If9dab2022a308b776d7ad760a61f0db97509b9b2 --- java/java.go | 41 ----------------------------------------- 1 file changed, 41 deletions(-) (limited to 'java/java.go') diff --git a/java/java.go b/java/java.go index e471f0de6..a025b1d03 100644 --- a/java/java.go +++ b/java/java.go @@ -2046,13 +2046,6 @@ func (j *Module) DexJarInstallPath() android.Path { return j.installFile } -func (j *Module) ResourceJars() android.Paths { - if j.resourceJar == nil { - return nil - } - return android.Paths{j.resourceJar} -} - func (j *Module) ImplementationAndResourcesJars() android.Paths { if j.implementationAndResourcesJar == nil { return nil @@ -2069,17 +2062,6 @@ func (j *Module) ClassLoaderContexts() dexpreopt.ClassLoaderContextMap { return j.classLoaderContexts } -// ExportedPlugins returns the list of jars needed to run the exported plugins, the list of -// classes for the plugins, and a boolean for whether turbine needs to be disabled due to plugins -// that generate APIs. -func (j *Module) ExportedPlugins() (android.Paths, []string, bool) { - return j.exportedPluginJars, j.exportedPluginClasses, j.exportedDisableTurbine -} - -func (j *Module) SrcJarArgs() ([]string, android.Paths) { - return j.srcJarArgs, j.srcJarDeps -} - var _ logtagsProducer = (*Module)(nil) func (j *Module) logtags() android.Paths { @@ -3046,17 +3028,6 @@ func (j *Import) HeaderJars() android.Paths { return android.Paths{j.combinedClasspathFile} } -func (j *Import) ImplementationJars() android.Paths { - if j.combinedClasspathFile == nil { - return nil - } - return android.Paths{j.combinedClasspathFile} -} - -func (j *Import) ResourceJars() android.Paths { - return nil -} - func (j *Import) ImplementationAndResourcesJars() android.Paths { if j.combinedClasspathFile == nil { return nil @@ -3072,22 +3043,10 @@ func (j *Import) DexJarInstallPath() android.Path { return nil } -func (j *Import) AidlIncludeDirs() android.Paths { - return j.exportAidlIncludeDirs -} - func (j *Import) ClassLoaderContexts() dexpreopt.ClassLoaderContextMap { return j.classLoaderContexts } -func (j *Import) ExportedPlugins() (android.Paths, []string, bool) { - return nil, nil, false -} - -func (j *Import) SrcJarArgs() ([]string, android.Paths) { - return nil, nil -} - var _ android.ApexModule = (*Import)(nil) // Implements android.ApexModule -- cgit v1.2.3 From b216661e84d36bba3a0581b2b0accc76db382c84 Mon Sep 17 00:00:00 2001 From: Julien Desprez Date: Fri, 5 Mar 2021 18:08:36 +0000 Subject: Revert "Revert "Attempt to run all java_test_host that look unit..." Revert reland the change after tests have been fixed Reason for revert: relanding after fixes Reverted Changes: I89fbce4d7:Revert "Exclude some tests for java_test_host onbo... Iaa89f9b7e:Revert "Attempt to run all java_test_host that loo... Change-Id: Idaa80b2d5a8d3ba026e33b453bd163a4e2d31118 --- java/java.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'java/java.go') diff --git a/java/java.go b/java/java.go index dbfad029b..f0eeb29c8 100644 --- a/java/java.go +++ b/java/java.go @@ -2505,6 +2505,11 @@ func (j *TestHost) DepsMutator(ctx android.BottomUpMutatorContext) { } func (j *Test) GenerateAndroidBuildActions(ctx android.ModuleContext) { + if j.testProperties.Test_options.Unit_test == nil && ctx.Host() { + // TODO(b/): Clean temporary heuristic to avoid unexpected onboarding. + defaultUnitTest := !inList("tradefed", j.properties.Static_libs) && !inList("tradefed", j.properties.Libs) && !inList("cts", j.testProperties.Test_suites) && !inList("robolectric-host-android_all", j.properties.Static_libs) && !inList("robolectric-host-android_all", j.properties.Libs) + j.testProperties.Test_options.Unit_test = proptools.BoolPtr(defaultUnitTest) + } j.testConfig = tradefed.AutoGenJavaTestConfig(ctx, j.testProperties.Test_config, j.testProperties.Test_config_template, j.testProperties.Test_suites, j.testProperties.Auto_gen_config, j.testProperties.Test_options.Unit_test) @@ -2665,6 +2670,7 @@ func TestHostFactory() android.Module { module.Module.properties.Installable = proptools.BoolPtr(true) InitJavaModuleMultiTargets(module, android.HostSupported) + return module } -- cgit v1.2.3