Closed jonathanpeppers closed 5 years ago
@Redth let me know if this makes sense, I can backport this for 28.x or something. I guess master is AndroidX?
@Redth does this even need to run for Android X? We might be able to skip this since we are not using any of the actual files...
Yeah we could skip this if the right AndroidX msbuild property is set...
@mattleibow @Redth do I need to change anything here? thanks.
FWIW we don't need this in AndroidX since we aren't running this target anymore there: https://github.com/xamarin/AndroidSupportComponents/blob/AndroidX/source/androidx.annotation/annotation/merge.targets#L4
Support Libraries Version
28.x
Does this change any of the generated binding API's?
No
Describe your contribution
When reviewing build logs from 2019 GA, I noticed an MSBuild target from the support libraries taking some time:
In a build with no changes, it was the 5th longest duration:
NOTE: you can do
msbuild foo.csproj /clp:performancesummary
for this breakdown.It looks like there are a couple things we can improve here:
No. 1 we can add a
Condition
, as I don't think it is worth the build time--DTBs are supposed to be as quick as possible. I don't think it's needed during DTBs at all?For No. 2, we can also skip this target after the first build unless:
AndroidManifest.xml
changes.So I setup a simple
.stamp
file, that will allow these target to skip unless one of the inputs changes.Details about how we do this in Xamarin.Android here:
https://github.com/xamarin/xamarin-android/blob/master/Documentation/guides/MSBuildBestPractices.md#stamp-files