Skip to content

Commit 8e65135

Browse files
authored
[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 b5920ec commit 8e65135

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
@@ -1919,7 +1919,7 @@ because xbuild doesn't support framework reference assemblies.
19191919
<_ProguardConfiguration Include="$(ProguardConfigFiles)" />
19201920
</ItemGroup>
19211921
<ItemGroup Condition=" '$(ProguardConfigFiles)' == '' ">
1922-
<_ProguardConfiguration Include="$(_AndroidSdkDirectory)tools\proguard\proguard-android.txt" />
1922+
<_ProguardConfiguration Include="$(_AndroidSdkDirectory)tools\proguard\proguard-android.txt" Condition=" Exists ('$(_AndroidSdkDirectory)tools\proguard\proguard-android.txt') " />
19231923
<_ProguardConfiguration Include="$(IntermediateOutputPath)proguard\proguard_xamarin.cfg" Condition=" '$(AndroidLinkTool)' != '' " />
19241924
<_ProguardConfiguration Include="$(_ProguardProjectConfiguration)" Condition=" '$(AndroidLinkTool)' != '' " />
19251925
<_ProguardConfiguration Include="$(IntermediateOutputPath)proguard\proguard_project_primary.cfg" Condition=" '$(AndroidLinkTool)' != '' " />

0 commit comments

Comments
 (0)