Loading android/apex.go +6 −2 Original line number Diff line number Diff line Loading @@ -849,8 +849,12 @@ func CheckMinSdkVersion(m UpdatableModule, ctx ModuleContext, minSdkVersion ApiL if err := to.ShouldSupportSdkVersion(ctx, minSdkVersion); err != nil { toName := ctx.OtherModuleName(to) if ver, ok := minSdkVersionAllowlist[toName]; !ok || ver.GreaterThan(minSdkVersion) { ctx.OtherModuleErrorf(to, "should support min_sdk_version(%v) for %q: %v. Dependency path: %s", minSdkVersion, ctx.ModuleName(), err.Error(), ctx.GetPathString(false)) ctx.OtherModuleErrorf(to, "should support min_sdk_version(%v) for %q: %v."+ "\n\nDependency path: %s\n\n"+ "Consider adding 'min_sdk_version: %q' to %q", minSdkVersion, ctx.ModuleName(), err.Error(), ctx.GetPathString(false), minSdkVersion, ctx.ModuleName()) return false } } Loading apex/apex.go +4 −2 Original line number Diff line number Diff line Loading @@ -2244,8 +2244,10 @@ func (a *apexBundle) checkApexAvailability(ctx android.ModuleContext) { if to.AvailableFor(apexName) || baselineApexAvailable(apexName, toName) { return true } ctx.ModuleErrorf("%q requires %q that doesn't list the APEX under 'apex_available'. Dependency path:%s", fromName, toName, ctx.GetPathString(true)) ctx.ModuleErrorf("%q requires %q that doesn't list the APEX under 'apex_available'."+ "\n\nDependency path:%s\n\n"+ "Consider adding %q to 'apex_available' property of %q", fromName, toName, ctx.GetPathString(true), apexName, toName) // Visit this module's dependencies to check and report any issues with their availability. return true }) Loading apex/apex_test.go +1 −1 Original line number Diff line number Diff line Loading @@ -5315,7 +5315,7 @@ func TestApexAvailable_DirectDep(t *testing.T) { func TestApexAvailable_IndirectDep(t *testing.T) { // libbbaz is an indirect dep testApexError(t, `requires "libbaz" that doesn't list the APEX under 'apex_available'. Dependency path: testApexError(t, `requires "libbaz" that doesn't list the APEX under 'apex_available'.\n\nDependency path: .*via tag apex\.dependencyTag.*name:sharedLib.* .*-> libfoo.*link:shared.* .*via tag cc\.libraryDependencyTag.*Kind:sharedLibraryDependency.* Loading Loading
android/apex.go +6 −2 Original line number Diff line number Diff line Loading @@ -849,8 +849,12 @@ func CheckMinSdkVersion(m UpdatableModule, ctx ModuleContext, minSdkVersion ApiL if err := to.ShouldSupportSdkVersion(ctx, minSdkVersion); err != nil { toName := ctx.OtherModuleName(to) if ver, ok := minSdkVersionAllowlist[toName]; !ok || ver.GreaterThan(minSdkVersion) { ctx.OtherModuleErrorf(to, "should support min_sdk_version(%v) for %q: %v. Dependency path: %s", minSdkVersion, ctx.ModuleName(), err.Error(), ctx.GetPathString(false)) ctx.OtherModuleErrorf(to, "should support min_sdk_version(%v) for %q: %v."+ "\n\nDependency path: %s\n\n"+ "Consider adding 'min_sdk_version: %q' to %q", minSdkVersion, ctx.ModuleName(), err.Error(), ctx.GetPathString(false), minSdkVersion, ctx.ModuleName()) return false } } Loading
apex/apex.go +4 −2 Original line number Diff line number Diff line Loading @@ -2244,8 +2244,10 @@ func (a *apexBundle) checkApexAvailability(ctx android.ModuleContext) { if to.AvailableFor(apexName) || baselineApexAvailable(apexName, toName) { return true } ctx.ModuleErrorf("%q requires %q that doesn't list the APEX under 'apex_available'. Dependency path:%s", fromName, toName, ctx.GetPathString(true)) ctx.ModuleErrorf("%q requires %q that doesn't list the APEX under 'apex_available'."+ "\n\nDependency path:%s\n\n"+ "Consider adding %q to 'apex_available' property of %q", fromName, toName, ctx.GetPathString(true), apexName, toName) // Visit this module's dependencies to check and report any issues with their availability. return true }) Loading
apex/apex_test.go +1 −1 Original line number Diff line number Diff line Loading @@ -5315,7 +5315,7 @@ func TestApexAvailable_DirectDep(t *testing.T) { func TestApexAvailable_IndirectDep(t *testing.T) { // libbbaz is an indirect dep testApexError(t, `requires "libbaz" that doesn't list the APEX under 'apex_available'. Dependency path: testApexError(t, `requires "libbaz" that doesn't list the APEX under 'apex_available'.\n\nDependency path: .*via tag apex\.dependencyTag.*name:sharedLib.* .*-> libfoo.*link:shared.* .*via tag cc\.libraryDependencyTag.*Kind:sharedLibraryDependency.* Loading