Skip to content

Commit

Permalink
[Xamarin.Android.Build.Tasks] fix warning when missing `proguard-andr…
Browse files Browse the repository at this point in the history
…oid.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.
  • Loading branch information
dellis1972 authored and jonathanpeppers committed Jan 18, 2024
1 parent 31f031a commit c22c17f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1940,7 +1940,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)' != '' " />
Expand Down

0 comments on commit c22c17f

Please sign in to comment.