[Xamarin.Android.Build.Tasks] fix classes-zip inception (#1142) #1180
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.
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=61073
Context: a296784
When we added the new
classes.zipfunctionality, there was one odditypresent. On the first build, everything appears to be normal. On the
second build,
classes.zipappeared to contain itself inside itself???To make things even stranger, I wrote a unit test that contains a
Java.Lang.Objectsubclass in which its type and namespace names changeon each write. This worked fine on macOS, even with the oddity of
classes.zipcontinually zipping itself inside itself... The new javasources would appear at the bottom of the list within the zip file.
Everything broke down when I tried my unit test on Windows, the case of
classes.ziptrying to compress itself inside itself was silentlyfailing. It was not processing any further files after the failing zip
entry, and so in theory this situation would cause many Java stubs to
be missing from the zip.
Solution? Let's just put
classes.zipup one directory.So instead of:
Move it to:
This prevents the
classesdirectory from containingclasses.zip, andour strange case of
classes.zipinception.Merry Christmas! I'm going to go play Skylanders now.