Update the Cordova / Phonegap (3.2.0) plugin in the project

I have my own written plugin in my-plugin/plugin .

I install it using the cordova plugin add my-plugin/plugin . It then appears under plugins/ and in my Android project.

Now I want to make some changes to this plugin, but I don’t know how to deploy these changes in my Android project.

My current workaround is cordova plugin rm com.my.plugin and then cordova plugin add my-plugin/plugin .

Is there a better way?

 $ cordova -v 3.2.0-0.2.0 
+7
android plugins cordova
source share
2 answers

You can only try the cordova plugin to add my-plugin / plugin and skip the uninstall, it seems to do the update, even though it reports that it is already installed.

Like you all that I assumed (or read somewhere, not sure which one) that cordova auto updated the plugins at creation, I don’t think so.

Phonegap 3.4 now has hooks that you can run based on commands like before_build, using those that you can run a script that updates your plugins every time you start the build.

See this blog for more information http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/

+8
source share

I had the same question and tried to find any documentation on updating cordova applications, but it seems to me that there is no documentation at all.

So, I did this with rm and add after that. But I can not believe that there is no better way :(

+4
source share

All Articles