Skip to content

Commit 1e9bc83

Browse files
committed
Switch on by default. Update the docs
1 parent 2070fb1 commit 1e9bc83

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Documentation/guides/building-apps/build-properties.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ automatically included in your package. So there is no need to upload
318318
it to the Google Play Store manually. If you are using `.apk` files
319319
you will need to manually upload the [`AndroidProguardMappingFile`](#androidproguardmappingfile).
320320

321-
The default value is `False`.
321+
The default value is `True` when using `AndroidLinkTool=r8`.
322322

323323
Added in Xamarin.Android 12.3.
324324

@@ -1009,19 +1009,18 @@ mean the `mapping.txt` file will be produced in the `$(OutputPath)`
10091009
folder. This file can then be used when uploading packages to the
10101010
Google Play Store.
10111011

1012-
By default this file is not produced.
1012+
By default this file is produced automatically when using `AndroidLinkTool=r8`
1013+
and will generate the following file `$(OutputPath)mapping.txt`.
10131014

1014-
If you do want to generate this mapping file you can use the
1015-
[`AndroidCreateProguardMappingFile`](#androidcreateproguardmappingfile) property to create it .
1015+
If you do not want to generate this mapping file you can use the
1016+
[`AndroidCreateProguardMappingFile`](#androidcreateproguardmappingfile) property to stop creating it .
10161017
Add the following in your project
10171018

10181019
```
1019-
<AndroidCreateProguardMappingFile>True</AndroidCreateProguardMappingFile>
1020+
<AndroidCreateProguardMappingFile>False</AndroidCreateProguardMappingFile>
10201021
```
10211022

1022-
or use `-p:AndroidCreateProguardMappingFile=True` on the command line.
1023-
1024-
This will then generate the following file `$(OutputPath)mapping.txt`.
1023+
or use `-p:AndroidCreateProguardMappingFile=False` on the command line.
10251024

10261025
This property was added in Xamarin.Android 11.2.
10271026

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved.
264264
<AndroidEnableDesugar Condition=" '$(AndroidEnableDesugar)' == '' And ('$(AndroidDexTool)' == 'd8' Or '$(AndroidLinkTool)' == 'r8') ">True</AndroidEnableDesugar>
265265
<AndroidEnableDesugar Condition=" '$(AndroidEnableDesugar)' == '' ">False</AndroidEnableDesugar>
266266
<AndroidR8IgnoreWarnings Condition=" '$(AndroidR8IgnoreWarnings)' == '' ">True</AndroidR8IgnoreWarnings>
267+
<AndroidCreateProguardMappingFile Condition="'$(AndroidCreateProguardMappingFile)' == '' And '$(AndroidLinkTool)' == 'r8'">True</AndroidCreateProguardMappingFile>
267268

268269
<!-- Figure out which is the main packaging format we want-->
269270
<AndroidPackageFormat Condition=" $(AndroidPackageFormats.Contains('aab')) And '$(AndroidPackageFormat)' == '' ">aab</AndroidPackageFormat>

0 commit comments

Comments
 (0)