Skip to content

Commit c22c17f

Browse files
dellis1972jonathanpeppers
authored andcommitted
[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.
1 parent 31f031a commit c22c17f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1940,7 +1940,7 @@ because xbuild doesn't support framework reference assemblies.
19401940
<_ProguardConfiguration Include="$(ProguardConfigFiles)" />
19411941
</ItemGroup>
19421942
<ItemGroup Condition=" '$(ProguardConfigFiles)' == '' ">
1943-
<_ProguardConfiguration Include="$(_AndroidSdkDirectory)tools\proguard\proguard-android.txt" />
1943+
<_ProguardConfiguration Include="$(_AndroidSdkDirectory)tools\proguard\proguard-android.txt" Condition=" Exists ('$(_AndroidSdkDirectory)tools\proguard\proguard-android.txt') " />
19441944
<_ProguardConfiguration Include="$(IntermediateOutputPath)proguard\proguard_xamarin.cfg" Condition=" '$(AndroidLinkTool)' != '' " />
19451945
<_ProguardConfiguration Include="$(_ProguardProjectConfiguration)" Condition=" '$(AndroidLinkTool)' != '' " />
19461946
<_ProguardConfiguration Include="$(IntermediateOutputPath)proguard\proguard_project_primary.cfg" Condition=" '$(AndroidLinkTool)' != '' " />

0 commit comments

Comments
 (0)