Merge "Friendly error message on apex_available and min_sdk_version checks" am: 4a349ab66b am: 5bb26755f9 am: 0aa0afdfe2

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1614908

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic88794c361b576be6032298dbca76173bd08331e
This commit is contained in:
Treehugger Robot
2021-03-05 06:22:49 +00:00
committed by Automerger Merge Worker
3 changed files with 11 additions and 5 deletions

View File

@@ -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
})