Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make PhoneGap - Android set up process as one step build?

We started to develop mobile apps for our existing web application by using phonegap. Here we supposed to follow different steps to build the mobile app for different operating systems. Now we started with Android, for that we need to follow some steps to set up the project to create app(Download ADT, copy required jars from phonegap sdk into adt eclipse lib folder, copy the xml file, and change the Manifest file) So we do not want all the team follows the steps required to set up environment, Is there any way to reduce these steps or Can we make the whole process as a build?

1) May i know what files to checked-in and how to checked-in into Git? 2) How to check out the project?

It is really becoming pain to build the project, I do not know how the people sharing phonegap project code and how they are checking out the project. Please help me...

like image 303
M.S.Naidu Avatar asked Oct 01 '22 07:10

M.S.Naidu


2 Answers

You don't need Eclipse to build Phonegap/Cordova, you can just call cordova build android on the command line. See the Cordova Command-Line docs. The .apk ends up in platforms/android/ant-build/.

When you are ready to upload to Google Play you just need to zipalign and sign the .apk, simple steps explained in Building and Running from the Command Line in the Android docs.

As for what to checkin, you don't need the platforms folder, that can just be regenerated. In principle you just need the code that you wrote, so only these:

  • config.xml
  • www folder
  • merges folder (if you use it)
  • cordova/plugins (or just re-add the plugins, static files in essence)
like image 186
Jan Misker Avatar answered Oct 07 '22 14:10

Jan Misker


you can use yeoman phonegap project boilerplate, for example this

like image 38
Marcin Mikołajczyk Avatar answered Oct 07 '22 14:10

Marcin Mikołajczyk