[Xamarin.Android.Build.Tasks] ReOrder when Assets are Processed. #1161
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.
Context #1150
The way the current system works is that the
UpdateAndroidAssets
target is called as part of the
ResolveReferencesDependsOn
. Thismakes it impossible to do any kind of processing of assets after
the project has already built. It also menas that a straight up
call to
Build
will result in all the assets being copied intothe intermediate directory. If your project has a large number
of assets that is going to take time. Note this might also be
called as part of a designtime build at the moment... not good.
So is there a reason why we call
UpdateAndroidAssets
beforeCompile
? We don't generate any entries in the Designer.cs filesfor them.. We don't clean them up.. we dont appear to do anything
except package them! So the anser looks to be a resounding NO!
So we shall move the
UpdateAndroidAssets
to be part of the_CreateBaseApkDependsOnTargets
. This means they will beprocessed just before we create the base apk. This will
occur after compilation has completed. So we have a win win..
This commit also includes a unit test which does some post processing
after the
Compile
target to update an asset, it makes sure thatpost processing does work.