From 16823282b97b944388e3a070e667a686d3b8a7fc Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Tue, 5 Nov 2024 12:56:14 -0600 Subject: [PATCH] [Xamarin.Android.Build.Tasks] stop using `proguard-android.txt` from Android SDK tools Context: https://discord.com/channels/732297728826277939/732297837953679412/1303383272918618163 A customer found their app grew in size when building on Windows versus macOS. The difference being a file that was passed to the `` task on Windows, but not on macOS: C:\Users\[username]\AppData\Local\Android\Sdk\tools\proguard\proguard-android.txt `tools` is *ancient*, as any Android SDK should be using `cmdline-tools` now. Let's stop using this file as a default set of proguard rules. --- src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets index d34717d1ff5..33333968b70 100644 --- a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets +++ b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets @@ -1899,7 +1899,6 @@ because xbuild doesn't support framework reference assemblies. <_ProguardConfiguration Include="$(ProguardConfigFiles)" /> - <_ProguardConfiguration Include="$(_AndroidSdkDirectory)tools\proguard\proguard-android.txt" Condition=" Exists ('$(_AndroidSdkDirectory)tools\proguard\proguard-android.txt') " /> <_ProguardConfiguration Include="$(IntermediateOutputPath)proguard\proguard_xamarin.cfg" Condition=" '$(AndroidLinkTool)' != '' " /> <_ProguardConfiguration Include="$(_ProguardProjectConfiguration)" Condition=" '$(AndroidLinkTool)' != '' " /> <_ProguardConfiguration Include="$(IntermediateOutputPath)proguard\proguard_project_primary.cfg" Condition=" '$(AndroidLinkTool)' != '' " />