Skip to content

CB-9597 Adds implementation for PlatformApiPoly class according to PlatformApi spec #282

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 2, 2015
Merged

Conversation

vladimir-kotikov
Copy link
Member

This implements PlatformApiPoly class according to PlatformApi spec, which allows to:

  • create/update platform
  • execute platform's actions (build/run/add/update)
  • do a prepare (needed for CLI workflow only)
  • install/uninstall plugins

Other noticeable changes:

  • removes getPlatformProject and PlatformProject method/class in favor of PlatformApiPoly/getPlatformApi
  • make assets and js-modules installing/uninstalling through ActionStack
  • refactor configChanges to not require plugins_dir in constructor
  • moves mergeXml helper to xml-helpers

This should be used along with cordova-cli/platformApi branch: apache/cordova-cli#220

@kamrik
Copy link
Contributor

kamrik commented Aug 24, 2015

Looks good! and very clean.

One note about tests, jasmine spies seem to give you a lot of trouble. In the previous refactoring round I was doing, I found it very useful to entirely replace some tests that rely on spies too much with something based on filesystem fixtures with less spying.

} else {
delete platform_config.dependent_plugins[plugin_id];
}
self.platformJson.addPlugin(pluginInfo.id, is_top_level);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FIXME: probably should be removePlugin()

@vladimir-kotikov
Copy link
Member Author

Thanks for advice, Mark. I have some plans about tests update and definitely will try fixtures-based approach.

@stevengill
Copy link
Contributor

Looks great Vlad! I'm fine with you merging this in and us spending some time testing it on master to make sure it works with all of our platforms.

This implements PlatformApiPoly class according to PlatformApi spec, which allows to:
  * create/update platform
  * execute platform's actions (build/run/add/update)
  * do a prepare (needed for CLI workflow only)
  * install/uninstall plugins

Other noticeable changes:
  * removes `getPlatformProject` and PlatformProject method/class in favor of PlatformApiPoly/getPlatformApi
  * make assets and js-modules installing/uninstalling through ActionStack
  * refactor configChanges to not require plugins_dir in constructor
  * moves mergeXml helper to xml-helpers

This should be used along with cordova-cli/platformApi branch
@vladimir-kotikov vladimir-kotikov changed the title Adds implementation for PlatformApiPoly class according to PlatformApi spec CB-9597 Adds implementation for PlatformApiPoly class according to PlatformApi spec Sep 2, 2015
@asfgit asfgit merged commit 07271a5 into apache:master Sep 2, 2015
@vladimir-kotikov vladimir-kotikov deleted the PlatformApi branch September 2, 2015 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants