AhmedAyachi commented on issue #201:
URL: https://github.com/apache/cordova-common/issues/201#issuecomment-1903627783

   @GiovanniBattista @breautek I think the idea of using an xml string to 
identify the code added to AndroidManifest is not as good as it seems to be, 
bacause in some cases you can end up adding something twice, for ex in my case, 
adding a permission tag from one plugin and the same permission with a 
maxSdkVersion attribute with another, will result on adding the same permission 
twice which means build failure, I think using a definition object inside 
parents is better be like below:
   ````
   {
       tag:"uses-permission",
       attributes:[
           {
               name:"android:name",
               value:"android.permission.READ_EXTERNAL_STORAGE",
               plugins:["plugin_1","plugin_2"],
           },
           {
               name:"android:maxSdkVersion",
               value:"30",
               plugins:["plugin_2"],
           }
       ]
   }
   ```
   and then if you remove a plugin , if the plugin exists in plugins and 
plugins.length>1, you keep the tag and just remove the plugin from plugins and 
if the plugins.length==1 then remove from AndroidManifest.
   I don't know it seems legit, I'm a bit busy these days, but i'll definitely 
give a shot, I just wrote this comment to someone who can work on it sooner.


-- 
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: issues-unsubscr...@cordova.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to