Merge "Improve apex build check explanation" am: c85964a734 am: ae0306f79d am: 80a95575bc am: 99857fc2c8

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

Change-Id: Id571592efb2d63455e5c65868fc399eabc98ca51
This commit is contained in:
Treehugger Robot
2022-01-20 22:24:18 +00:00
committed by Automerger Merge Worker
2 changed files with 11 additions and 4 deletions

View File

@@ -3211,8 +3211,15 @@ func createApexPermittedPackagesRules(modules_packages map[string][]string) []an
WithMatcher("permitted_packages", android.NotInList(module_packages)).
WithMatcher("min_sdk_version", android.LessThanSdkVersion("Tiramisu")).
Because("jars that are part of the " + module_name +
" module may only allow these packages: " + strings.Join(module_packages, ",") +
" with min_sdk < T. Please jarjar or move code around.")
" module may only use these package prefixes: " + strings.Join(module_packages, ",") +
" with min_sdk < T. Please consider the following alternatives:\n" +
" 1. If the offending code is from a statically linked library, consider " +
"removing that dependency and using an alternative already in the " +
"bootclasspath, or perhaps a shared library." +
" 2. Move the offending code into an allowed package.\n" +
" 3. Jarjar the offending code. Please be mindful of the potential system " +
"health implications of bundling that code, particularly if the offending jar " +
"is part of the bootclasspath.")
rules = append(rules, permittedPackagesRule)
}
return rules