You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2022/05/05 18:55:28 UTC

[GitHub] [cordova-lib] breautek commented on issue #892: Adding plugins for only specific platforms

breautek commented on issue #892:
URL: https://github.com/apache/cordova-lib/issues/892#issuecomment-1118940379

   Personally I'd support this kind of feature, but I don't know if overloading the `--variable` is a good idea for this. I think it may be best to keep that reserved for actual plugin variables.
   
   I think it may better to introduce a new `--platforms` argument. But I do understand the motivation of reusing the `--variable` flag, as it would allow restoration to work easily because it would be compatible with the current `package.json` structure that cordova uses.
   
   To solve the restoration issue, the `--platforms` argument will require a more extensible `cordova` structure in it's `package.json`. Which I think is doable but would likely require a series of PRs before a PR can be made to tackle this issue. This obviously requires a bit extra work but I think is worth it for a cleaner API. It's always easy to add something, but difficult to remove or change.
   
   Interested in hearing your thoughts on this.
   
   > It is impossible to do it without manual intervention right now. The only way is to add plugin and then delete specific folders and files which is quite cumbersome and highly repetitive.
   
   Just to add another work around. The plugin could always be forked and have it's platform implementation removed (even just  from it's `plugin.xml` entry) and that should be sufficient to use a plugin and omit one platform's implementation. The drawback of course is that you'd have to manage the fork and periodically pull in updates from upstream and deal with merge conflicts.


-- 
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-unsubscribe@cordova.apache.org

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


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