breautek commented on issue #1603:
URL: 
https://github.com/apache/cordova-android/issues/1603#issuecomment-1516900628

   > One more question. I uploaded the generate apk file to the play console 
and there is a warning saying that there isn't a file that discloses obfuscated 
code (R8/ProGuard). Is there a way to generate this disclosure file with 
cordova? Or should one migrate to the Android App Bundle format?
   
   I'm not 100% sure what you're seeing but Cordova doesn't provide any 
ProGuard/R8 configuration. Mostly because it's not very useful since it will 
break Cordova. ProGuard (or R8) obfuscates the native code and mangles symbols 
so it makes it more difficult to reverse engineer, and to also to make the 
final product size smaller. But Cordova relies on finding classes/method names 
by strings so mangling symbols will break that mechanism.
   
   If you want to use Proguard or R8, it must be configured in a way that it 
doesn't touch the Cordova classes or plugins.
   
   I think Google will provide the warning when you upload your bundle because 
they recommend and want to encourage users to use it even if it's just to 
shrink the file size of your app. But yah, it will break Cordova unless if you 
tailed it specifically to not touch any cordova bits.
   
   If you develop your own plugins, you could use Proguard/R8 on the plugin by 
creating an Android library with the cordova bits abstracted out  for example, 
so that the bulk of the library is proguarded while the cordova interface to 
your plugin is not.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to