davidortinau / Xappy

A mobile app to track Xamarin news and explore all the goodness that is .NET for Mobile developers
MIT License
350 stars 106 forks source link

[build] .csproj changes to improve Android build times #65

Closed jonathanpeppers closed 3 years ago

jonathanpeppers commented 3 years ago

Initially a clean build for me using VS 2019 16.8 was:

> git clean -dxf
> msbuild .\Xappy\Xappy.Android\Xappy.Android.csproj -r -bl
Time Elapsed 00:00:30.43

I noticed that <R8/> was running, so I removed the multi-dex setting. This got it down to:

Time Elapsed 00:00:27.05

Next, I noticed that AndroidX.Migration was running and doing work:

CecilfyFiles = 1.680 s

I removed all Android.Support.* NuGet packages, as they did not seem to be needed. We could also remove the Resources\layout\Tabbar.axml and Toolbar.axml files, as the latest Xamarin.Forms does not use them. They were using android.support.design.widget.TabLayout and android.support.v7.widget.Toolbar.

This got the initial build down to:

Time Elapsed 00:00:21.22