Hi all, I am a big fan of the experimental "save" and "restore" features that are in the CLI and saw that Gorkem has also created another PR (https://github.com/apache/cordova-lib/pull/143 ) to have a setting to auto persist/restore plugin versions which is a really interesting idea. On a related note, one issue I ran into with platform save/restore is when you need to involve multiple operating systems for a given project. Ex: Targeting say iOS, Windows, and Ubuntu from the same project or simply have some team members on OSX or Linux while others are on Windows - you need to be able to "save" or "restore" only platforms that run on the OS you are currently using.
For the restore situation, it seems to make quite a bit of sense to use any version information in config.xml when you add a platform by default. The fact the information in is in config.xml indicates the goal is consistency. Here is a PR that adds this functionality for platforms: https://github.com/apache/cordova-lib/pull/140#issuecomment-68942932 With that in mind, we could also follow that familiar pattern that exists with npm and package.json to help out when you want to quickly save the platform you added to config.xml. Ex: cordova platform add android --save ...adds the latest android platform and updates config.xml with the version that was added. As always, you can always use the existing syntax to add a different version (cordova platform add android@4.0.0<mailto:android@4.0.0>). I'm planning on putting together a PR on that idea as well. We could actually follow a similar model for plugins as well. Thanks, Mefire