Loading android/testing.go +1 −1 Original line number Diff line number Diff line Loading @@ -1122,7 +1122,7 @@ func AndroidMkEntriesForTest(t *testing.T, ctx *TestContext, mod blueprint.Modul entriesList := p.AndroidMkEntries() aconfigUpdateAndroidMkEntries(ctx, mod.(Module), &entriesList) for i := range entriesList { for i, _ := range entriesList { entriesList[i].fillInEntries(ctx, mod) } return entriesList Loading apex/apex.go +1 −7 Original line number Diff line number Diff line Loading @@ -1677,13 +1677,7 @@ func apexFileForJavaModuleWithFile(ctx android.BaseModuleContext, module javaMod af.jacocoReportClassesFile = module.JacocoReportClassesFile() af.lintDepSets = module.LintDepSets() af.customStem = module.Stem() + ".jar" // TODO: b/338641779 - Remove special casing of sdkLibrary once bcpf and sscpf depends // on the implementation library if sdkLib, ok := module.(*java.SdkLibrary); ok { for _, install := range sdkLib.BuiltInstalledForApex() { af.requiredModuleNames = append(af.requiredModuleNames, install.FullModuleName()) } } else if dexpreopter, ok := module.(java.DexpreopterInterface); ok { if dexpreopter, ok := module.(java.DexpreopterInterface); ok { for _, install := range dexpreopter.DexpreoptBuiltInstalledForApex() { af.requiredModuleNames = append(af.requiredModuleNames, install.FullModuleName()) } Loading apex/apex_test.go +2 −2 Original line number Diff line number Diff line Loading @@ -7146,7 +7146,7 @@ func TestJavaSDKLibrary_WithinApex(t *testing.T) { // The bar library should depend on the implementation jar. barLibrary := ctx.ModuleForTests("bar", "android_common_myapex").Rule("javac") if expected, actual := `^-classpath [^:]*/turbine-combined/foo\.jar$`, barLibrary.Args["classpath"]; !regexp.MustCompile(expected).MatchString(actual) { if expected, actual := `^-classpath [^:]*/turbine-combined/foo\.impl\.jar$`, barLibrary.Args["classpath"]; !regexp.MustCompile(expected).MatchString(actual) { t.Errorf("expected %q, found %#q", expected, actual) } } Loading Loading @@ -7287,7 +7287,7 @@ func TestJavaSDKLibrary_ImportPreferred(t *testing.T) { // The bar library should depend on the implementation jar. barLibrary := ctx.ModuleForTests("bar", "android_common_myapex").Rule("javac") if expected, actual := `^-classpath [^:]*/turbine-combined/foo\.jar$`, barLibrary.Args["classpath"]; !regexp.MustCompile(expected).MatchString(actual) { if expected, actual := `^-classpath [^:]*/turbine-combined/foo\.impl\.jar$`, barLibrary.Args["classpath"]; !regexp.MustCompile(expected).MatchString(actual) { t.Errorf("expected %q, found %#q", expected, actual) } } Loading java/androidmk_test.go +2 −2 Original line number Diff line number Diff line Loading @@ -161,8 +161,8 @@ func TestJavaSdkLibrary_RequireXmlPermissionFile(t *testing.T) { moduleName string expected []string }{ {"foo-shared_library", []string{"foo-shared_library.impl", "foo-shared_library.xml"}}, {"foo-no_shared_library", []string{"foo-no_shared_library.impl"}}, {"foo-shared_library", []string{"foo-shared_library.xml"}}, {"foo-no_shared_library", nil}, } for _, tc := range testCases { mod := result.ModuleForTests(tc.moduleName, "android_common").Module() Loading java/base.go +1 −5 Original line number Diff line number Diff line Loading @@ -1682,11 +1682,7 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars, extraClasspath j.dexJarFile = makeDexJarPathFromPath(dexOutputFile) // Dexpreopting libName := android.RemoveOptionalPrebuiltPrefix(ctx.ModuleName()) if j.SdkLibraryName() != nil && strings.HasSuffix(ctx.ModuleName(), ".impl") { libName = strings.TrimSuffix(libName, ".impl") } j.dexpreopt(ctx, libName, dexOutputFile) j.dexpreopt(ctx, android.RemoveOptionalPrebuiltPrefix(ctx.ModuleName()), dexOutputFile) outputFile = dexOutputFile } else { Loading Loading
android/testing.go +1 −1 Original line number Diff line number Diff line Loading @@ -1122,7 +1122,7 @@ func AndroidMkEntriesForTest(t *testing.T, ctx *TestContext, mod blueprint.Modul entriesList := p.AndroidMkEntries() aconfigUpdateAndroidMkEntries(ctx, mod.(Module), &entriesList) for i := range entriesList { for i, _ := range entriesList { entriesList[i].fillInEntries(ctx, mod) } return entriesList Loading
apex/apex.go +1 −7 Original line number Diff line number Diff line Loading @@ -1677,13 +1677,7 @@ func apexFileForJavaModuleWithFile(ctx android.BaseModuleContext, module javaMod af.jacocoReportClassesFile = module.JacocoReportClassesFile() af.lintDepSets = module.LintDepSets() af.customStem = module.Stem() + ".jar" // TODO: b/338641779 - Remove special casing of sdkLibrary once bcpf and sscpf depends // on the implementation library if sdkLib, ok := module.(*java.SdkLibrary); ok { for _, install := range sdkLib.BuiltInstalledForApex() { af.requiredModuleNames = append(af.requiredModuleNames, install.FullModuleName()) } } else if dexpreopter, ok := module.(java.DexpreopterInterface); ok { if dexpreopter, ok := module.(java.DexpreopterInterface); ok { for _, install := range dexpreopter.DexpreoptBuiltInstalledForApex() { af.requiredModuleNames = append(af.requiredModuleNames, install.FullModuleName()) } Loading
apex/apex_test.go +2 −2 Original line number Diff line number Diff line Loading @@ -7146,7 +7146,7 @@ func TestJavaSDKLibrary_WithinApex(t *testing.T) { // The bar library should depend on the implementation jar. barLibrary := ctx.ModuleForTests("bar", "android_common_myapex").Rule("javac") if expected, actual := `^-classpath [^:]*/turbine-combined/foo\.jar$`, barLibrary.Args["classpath"]; !regexp.MustCompile(expected).MatchString(actual) { if expected, actual := `^-classpath [^:]*/turbine-combined/foo\.impl\.jar$`, barLibrary.Args["classpath"]; !regexp.MustCompile(expected).MatchString(actual) { t.Errorf("expected %q, found %#q", expected, actual) } } Loading Loading @@ -7287,7 +7287,7 @@ func TestJavaSDKLibrary_ImportPreferred(t *testing.T) { // The bar library should depend on the implementation jar. barLibrary := ctx.ModuleForTests("bar", "android_common_myapex").Rule("javac") if expected, actual := `^-classpath [^:]*/turbine-combined/foo\.jar$`, barLibrary.Args["classpath"]; !regexp.MustCompile(expected).MatchString(actual) { if expected, actual := `^-classpath [^:]*/turbine-combined/foo\.impl\.jar$`, barLibrary.Args["classpath"]; !regexp.MustCompile(expected).MatchString(actual) { t.Errorf("expected %q, found %#q", expected, actual) } } Loading
java/androidmk_test.go +2 −2 Original line number Diff line number Diff line Loading @@ -161,8 +161,8 @@ func TestJavaSdkLibrary_RequireXmlPermissionFile(t *testing.T) { moduleName string expected []string }{ {"foo-shared_library", []string{"foo-shared_library.impl", "foo-shared_library.xml"}}, {"foo-no_shared_library", []string{"foo-no_shared_library.impl"}}, {"foo-shared_library", []string{"foo-shared_library.xml"}}, {"foo-no_shared_library", nil}, } for _, tc := range testCases { mod := result.ModuleForTests(tc.moduleName, "android_common").Module() Loading
java/base.go +1 −5 Original line number Diff line number Diff line Loading @@ -1682,11 +1682,7 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars, extraClasspath j.dexJarFile = makeDexJarPathFromPath(dexOutputFile) // Dexpreopting libName := android.RemoveOptionalPrebuiltPrefix(ctx.ModuleName()) if j.SdkLibraryName() != nil && strings.HasSuffix(ctx.ModuleName(), ".impl") { libName = strings.TrimSuffix(libName, ".impl") } j.dexpreopt(ctx, libName, dexOutputFile) j.dexpreopt(ctx, android.RemoveOptionalPrebuiltPrefix(ctx.ModuleName()), dexOutputFile) outputFile = dexOutputFile } else { Loading