[Xamarin.Android.Build.Tasks] fix warning when missing `proguard-android.txt` (#8641)

We are seeing numerous test failures because of this warning.

    warning XA4304: ProGuard configuration file 'C:\Android\android-sdk\tools\proguard\proguard-android.txt' was not found.

This is because the `proguard-android.txt` file no longer ships with the
Android SDK. We should check this file exists before adding it to the
list of `@(_ProguardConfiguration)` files. This way if a user still does
have it, it will be included.
This commit is contained in:
Dean Ellis 2024-01-17 01:35:21 +00:00 коммит произвёл GitHub
Родитель b5920ec6cf
Коммит 8e65135ad4
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -1919,7 +1919,7 @@ because xbuild doesn't support framework reference assemblies.
<_ProguardConfiguration Include="$(ProguardConfigFiles)" />
</ItemGroup>
<ItemGroup Condition=" '$(ProguardConfigFiles)' == '' ">
<_ProguardConfiguration Include="$(_AndroidSdkDirectory)tools\proguard\proguard-android.txt" />
<_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)' != '' " />