You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Solana Huertas, Javier" <js...@indra.es> on 2014/12/11 16:46:12 UTC
Build proyect on different Android Cordova in the same PC
Hi!
It is possible to have in one PC, differents android cordova version and generate (build) the same project for each platform version?
For example, right now we work with version 2.9 and want to test if the project is compatible on actual version 3.6.4.
Thanks!
Javier Solana Huertas
Software Labs
[cid:image001.gif@01D01561.35401EB0]<http://www.youtube.com/user/theindracompany?feature=chclk>
[cid:image002.gif@01D01561.35401EB0]<http://www.facebook.com/indracompany>
[cid:image003.gif@01D01561.35401EB0]<http://twitter.com/#!/indracompany>
[cid:image004.gif@01D01561.35401EB0]<http://www.linkedin.com/company/indra>
[cid:image005.gif@01D01561.35401EB0]<https://plus.google.com/107135201985474086995/posts>
[cid:image006.gif@01D01561.35401EB0]<http://www.indracompany.com/es/blogneo>
________________________________
Este correo electr?nico y, en su caso, cualquier fichero anexo al mismo, contiene informaci?n de car?cter confidencial exclusivamente dirigida a su destinatario o destinatarios. Si no es vd. el destinatario indicado, queda notificado que la lectura, utilizaci?n, divulgaci?n y/o copia sin autorizaci?n est? prohibida en virtud de la legislaci?n vigente. En el caso de haber recibido este correo electr?nico por error, se ruega notificar inmediatamente esta circunstancia mediante reenv?o a la direcci?n electr?nica del remitente.
Evite imprimir este mensaje si no es estrictamente necesario.
This email and any file attached to it (when applicable) contain(s) confidential information that is exclusively addressed to its recipient(s). If you are not the indicated recipient, you are informed that reading, using, disseminating and/or copying it without authorisation is forbidden in accordance with the legislation in effect. If you have received this email by mistake, please immediately notify the sender of the situation by resending it to their email address.
Avoid printing this message if it is not absolutely necessary.
Re: Build proyect on different Android Cordova in the same PC
Posted by Ivan Karpan <iv...@gmail.com>.
Hello Julio,
I think we are just answering different questions, both valid. I was speaking to possibility of maintaining source code that uses different version of Cordova, you addressed the necessity of upgrading from 2.9 to 3.X.
I agree with you that the upgrade process is going to be very painful… When I did it I had to increment minor versions doing following all the in-between upgrade instructions from the docs and double-checking nothing died on me in the project in terms of functionality.
As for the plugins I just switched to using Cordova cli and everything worked fine since (with the exception of couple quirks that I solved by pretty much just removing/installing the plugins).
On Fri, Dec 12, 2014 at 3:09 PM, julio cesar sanchez
<jc...@gmail.com> wrote:
> I have not tried what Ivan said, but as you are on version 2.9.0 I don't
> think you can because cordova 2.9.0 wasn't installed on the system, just
> downloaded, and there is no direct update from 2.9.X to 3.X.X.
> What I did when upgraded from 2.9.1 to 3.6.4 was, I generated the
> cordova-3.6.4.jar, deleted cordova-2.9.1.jar from the android project,
> added cordova-3.6.4.jar and tested, as 2.9.1 included all the plugins in
> the core and cordova 3.X.X didn't include them, I had to install the
> plugins I was using with plugman.
> So, updating like I mentioned, you can generate the .jar for any cordova
> version and just test it, but your project won't be a real cordova project
> and you'll need to update everytime like this, and install the plugins
> using plugman instead of using the cordova CLI
> So, the other choice you have is to create a new project using the CLI,
> copy your current html, css and javascript and try. If you were using any
> plugin it wont work, so you install the plugins you need using the cordova
> CLI and then you will be able to update easily on new cordova updates.
Re: Build proyect on different Android Cordova in the same PC
Posted by julio cesar sanchez <jc...@gmail.com>.
I have not tried what Ivan said, but as you are on version 2.9.0 I don't
think you can because cordova 2.9.0 wasn't installed on the system, just
downloaded, and there is no direct update from 2.9.X to 3.X.X.
What I did when upgraded from 2.9.1 to 3.6.4 was, I generated the
cordova-3.6.4.jar, deleted cordova-2.9.1.jar from the android project,
added cordova-3.6.4.jar and tested, as 2.9.1 included all the plugins in
the core and cordova 3.X.X didn't include them, I had to install the
plugins I was using with plugman.
So, updating like I mentioned, you can generate the .jar for any cordova
version and just test it, but your project won't be a real cordova project
and you'll need to update everytime like this, and install the plugins
using plugman instead of using the cordova CLI
So, the other choice you have is to create a new project using the CLI,
copy your current html, css and javascript and try. If you were using any
plugin it wont work, so you install the plugins you need using the cordova
CLI and then you will be able to update easily on new cordova updates.
Re: Build proyect on different Android Cordova in the same PC
Posted by Ivan Karpan <iv...@gmail.com>.
Hello Javier,
Yes, of course it is possible. I am also working on a project that started some time ago and I have been upgrading the version of Cordova with its every update. In my case I needed a solution that could also allow switching between branches and be able to easily reinstall the relevant Cordova version. This was important to be able to test new Cordova version in a separate branch as well as switch back and forth between versions when we did our releases.
Our team solved the problem by using a package manager, specifically - node. We added package.json to our own source code and described there all of the dependencies our code had that could be installed via npm. And so if say I would switch back to some older version triggering npm install would downgrade all of the libraries to exactly those versions compatible with out source code then.
This approach is also very useful if you need to set up the project on a new PC. npm install and you are ready to go.
One other advantage is that while npm is able to install all the packages globally you should do it locally (it is so by default). It will create a ./node_modules folder that you should ignore for your source control. You will not have to store all the libraries you need in your repository this way and you will also be able to work with multiple checkouts of your app simultaneously and they will not conflict with one another. Be sure to use the local Cordova cli (./node_modules/cordova/bin/cordova), you can create a symlink to make it easier.
You can read more about this here:
http://howtonode.org/managing-module-dependencies
One more tip - always specify the exact package version you are working with in your package.json. This way you will not be automatically updated and when checking out an older version of your source code all of the dependencies will be fixed.
I hope this helps.
On Thu, Dec 11, 2014 at 6:20 PM, Solana Huertas, Javier <js...@indra.es>
wrote:
> Hi!
> It is possible to have in one PC, differents android cordova version and generate (build) the same project for each platform version?
> For example, right now we work with version 2.9 and want to test if the project is compatible on actual version 3.6.4.
> Thanks!
> Javier Solana Huertas
> Software Labs
> [cid:image001.gif@01D01561.35401EB0]<http://www.youtube.com/user/theindracompany?feature=chclk>
> [cid:image002.gif@01D01561.35401EB0]<http://www.facebook.com/indracompany>
> [cid:image003.gif@01D01561.35401EB0]<http://twitter.com/#!/indracompany>
> [cid:image004.gif@01D01561.35401EB0]<http://www.linkedin.com/company/indra>
> [cid:image005.gif@01D01561.35401EB0]<https://plus.google.com/107135201985474086995/posts>
> [cid:image006.gif@01D01561.35401EB0]<http://www.indracompany.com/es/blogneo>
> ________________________________
> Este correo electr?nico y, en su caso, cualquier fichero anexo al mismo, contiene informaci?n de car?cter confidencial exclusivamente dirigida a su destinatario o destinatarios. Si no es vd. el destinatario indicado, queda notificado que la lectura, utilizaci?n, divulgaci?n y/o copia sin autorizaci?n est? prohibida en virtud de la legislaci?n vigente. En el caso de haber recibido este correo electr?nico por error, se ruega notificar inmediatamente esta circunstancia mediante reenv?o a la direcci?n electr?nica del remitente.
> Evite imprimir este mensaje si no es estrictamente necesario.
> This email and any file attached to it (when applicable) contain(s) confidential information that is exclusively addressed to its recipient(s). If you are not the indicated recipient, you are informed that reading, using, disseminating and/or copying it without authorisation is forbidden in accordance with the legislation in effect. If you have received this email by mistake, please immediately notify the sender of the situation by resending it to their email address.
> Avoid printing this message if it is not absolutely necessary.