[Xamarin.Android.Build.Tasks] GenerateJavaStubs Rebuilds #799
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Commit 9d131af introduced a unit test failure on
xamarin-android/master:
Aside: The XA4212 test creates a project with a bad
IJavaObjecttype, builds the project -- which triggers an XA4212 error, which is
observed in the unit test -- then rebuilds the project, but this
time with
$(AndroidErrorOnCustomJavaObject)=False.The intention is that the second build should instead elicit an XA4212
warning, but otherwise continue just fine.
What's interesting about the log file contents is that it shows that
the
<GenerateJavaStubs/>task isn't executed at all, but it's the<GenerateJavaStubs/>task which is supposed to emit the warning!Update the
<GenerateJavaStubs/>task so that if it errors out, itremoves any
<GenerateJavaStubs/>output files. This will ensurethat on subsequent builds, the
_GenerateJavaStubstarget won't beinadvertently skipped.
(This issue should have been caught during the
macOS+xbuild PR builder build for PR #797. It wasn't,
because the
Xamarin.Android.Build.Teststests weren't reported. Forexample, PR #1491 ran 869 tests, while PR #1492 ran 1085! I'm not sure
what can be done to better detect and prevent this in the future.)