Proguard not supported by default
See original GitHub issueWhen using proguard + msal, the following rules are required to make the client work:
# This enum is accessed via reflection in common msal lib thus proguard removes it.
-keep public enum com.microsoft.identity.common.internal.ui.AuthorizationAgent {
*;
}
# Classes for below package is used by MSAL library. Ignore warning coming from the dependency.
-dontwarn com.nimbusds.jose.**
This rules can be packaged directly in the msal library and common library instead of asking developers to do so.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:15 (9 by maintainers)
Top Results From Across the Web
Pro-guard Obfuscation not working in android studio
Below is the sample how to enable default ProGuard in Android Studio. 1) Go to the build.gradle file of app. 2) enable the...
Read more >Configuring ProGuard | CodePath Android Cliffnotes
ProGuard can be enabled by using the minifyEnabled option for any build type. If you intend to use it for production, it is...
Read more >Android Default ProGuard Rules | Guide - ProAndroidDev
This rule specifies that the @Keep annotated elements like methods and classes that are accessed only via reflection should not be removed when ......
Read more >Troubleshooting ProGuard issues on Android - Medium
The Android ProGuard rules include some safe defaults for every Android app, such as making sure View getters and setters - which are...
Read more >ProGuard Manual: Troubleshooting - Guardsquare
If ProGuard is not keeping the right classes or class members, make sure you are using fully qualified class names. If the package...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is what came up when fixing the rules when used in AppCenter:
https://github.com/microsoft/AppCenter-SDK-Android/pull/1149/files#diff-54abb45c98c994c8e22a56dc46f07a0b
This covers basic AAD B2C scenarios but you might want to apply that keep rules to every model or enum used via Gson.
We can already do it in proguard, the Microsoft AppCenter SDK uses this already.
Just needs
In the build.gradle for the library.
It will be automatically added by android gradle plugin as proguard.txt in the AAR file and added to app rules if consumed as a dependency.