dotnet / dotnet/android

Missing documentation on recommended release settings. D8andR8.md is likely outdated

Aperta
#8,917 3 commenti 0 reazioni 2 assegnatari Rivendicata da @jonathanpeppers Vedi su GitHub
Area: App+Library Build Area: Documentation
Lingua principale
C#
Stelle
2.1k
Fork
579
Merge medio
1g 21h
PR unite (30g)
257

Descrizione

### Android application type

.NET Android (net7.0-android, net8.0-android, etc.)

### Affected platform version

Not relevant

### Description

This is a documentation issue - I would like to know what optimization settings are recommended when publishing a Release version to the Google Play store.

For Xamarin there was a lot of detailed documentation:
- https://learn.microsoft.com/en-us/previous-versions/xamarin/android/deploy-test/release-prep/?tabs=windows
- https://learn.microsoft.com/en-us/previous-versions/xamarin/android/deploy-test/release-prep/proguard?tabs=windows

For .NET MAUI there is no equivalent about what settings to use, and in Visual Studio it looks like R8 is the only recommended code shrinker now. I cannot find a ProGuard option in the project settings and the only shrinker option in Visual Studio is R8:
![image](https://github.com/xamarin/xamarin-android/assets/3463496/71c04524-5a74-4b36-bcee-f8be5a7abb8b)

However, I cannot find any documentation on the R8 shrinker becoming the new default. In the .NET for Android repo there is https://github.com/xamarin/xamarin-android/blob/main/Documentation/guides/D8andR8.md which was last updated 6 years ago.

That document says
> If AndroidDexTool is omitted, dx and CompileToDalvik should be used. Until D8/R8 integration is deemed stable and enabled by default.

However, that was 6 years ago...

What are the recommended settings for releasing a .NET for Android / MAUI Android app today?

### Steps to Reproduce

Not applicable

### Did you find any workaround?

_No response_

### Relevant log output

_No response_

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.