-
Notifications
You must be signed in to change notification settings - Fork 528
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Xamarin.Android.Build.Tasks] Rework Aapt log processing. (#1153)
Fixes: #1134 `aapt` is pretty inconsistent with how it reports errors and warnings; for example, warnings are written to stderr. This is a bit of a conundrum: * Messages *may* contain `error` or `warning`, but they might not (no level specified; 2135856). * Messages written to stderr may be warnings, *not* errors. * The `aapt` return value may be non-zero when warnings are written but output files are still generated. In particular, consider Issue #1134: `aapt` writes to stderr: max res 10, skipping values-sw720dp-land-v13 "max res 10, skipping values-sw720dp-land-v13". This was previously being reported as an error, "simply" because it was written to stderr, but the above is *not* an error. Rework `aapt` output processing to hopefully handle errors and warnings in a more consistent way. Instead of processing the output in realtime we will instead buffer it and process the output once `aapt` has completed. This will allow us to check to see if the required output file (`R.java`) was created. If `R.java` *is* created, messages written to stderr without an explicit level will be treated as warnings. If `R.java` is *not* created, messages written to stderr without an explicit level will be treated as *errors*.
- Loading branch information
1 parent
6aabfef
commit 23c5801
Showing
3 changed files
with
55 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters