Differences between revisions 8 and 9
Revision 8 as of 2013-07-10 13:22:16
Size: 2471
Editor: AndrewGrieve
Comment:
Revision 9 as of 2013-09-20 21:48:20
Size: 2623
Editor: MarcelKinard
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
3.0 flow that uses coho and the dependency plugin to build mobile-spec for
ios & android where all plugins & repos point to dev versions:
3.0 flow that uses coho and the dependency plugin to build mobile-spec for ios & android where all plugins & repos point to dev versions. The manual steps are described below. Alternately, these steps can be performed automatically by running {{{ cordova-mobile-spec/createmobilespec.sh }}}

3.0 flow that uses coho and the dependency plugin to build mobile-spec for ios & android where all plugins & repos point to dev versions. The manual steps are described below. Alternately, these steps can be performed automatically by running  cordova-mobile-spec/createmobilespec.sh 

If you have already cloned the repos specified below, you may need to do a repo update first:

./cordova-coho/coho repo-update -r auto

Otherwise, start by cloning:

./cordova-coho/coho repo-clone -r plugins -r mobile-spec -r android -r ios -r cli
cd cordova-cli && npm install && cd ..

Create a project:

./cordova-cli/bin/cordova create mobilespec org.apache.test mobilespec
cd mobilespec

Edit .cordova/config.json to be (change the 'uri' values to your specific locations):

{
  "id":"org.apache.mobilespec",
  "name":"mobilespec",
  "lib": {
    "android": {
      "uri": "/Users/agrieve/git/cordova/cordova-android",
      "version": "dev",
      "id": "cordova-android-dev"
    },
    "ios": {
      "uri": "/Users/agrieve/git/cordova/cordova-ios",
      "version": "dev",
      "id": "cordova-ios-dev"
    }
  }
}

Install things.

../cordova-cli/bin/cordova platform add ios android
../cordova-cli/bin/cordova plugin add ../cordova-mobile-spec/dependencies-plugin
rm -r www
ln -s ../cordova-mobile-spec www

Update cordova-js snapshot or else you'll be using the snapshot from your platform's repo. You'll need to do this before every prepare.

( cd ../cordova-js; grunt )
cp ../cordova-js/pkg/cordova.ios.js platforms/ios/www/cordova.js
cp ../cordova-js/pkg/cordova.android.js platforms/android/assets/www/cordova.js && 

../cordova-cli/bin/cordova prepare

To apply changes from a plugin:

../cordova-cli/bin/cordova plugin rm org.cordova.mobile-spec-dependencies
../cordova-cli/bin/cordova plugin rm PLUGIN_ID
../cordova-cli/bin/cordova plugin add PLUGIN_ID

To apply changes to platform code:

../cordova-cli/bin/cordova platform rm android
../cordova-cli/bin/cordova platform add android

Potential Issues

If you get the error:

[TypeError: Invalid Version: 2.7.0rc1]

then you've hit the problem where Android's version script reports the version by parsing it out of the comment in the cordova.js file. This is completely wrong, since it's not even reporting the version of the Android repo, but rather the version of the cordova-js version. You can work around it by editing the comment in the .js file, or just having the version script echo a newer version.

WorkingWithThree (last edited 2013-09-20 21:48:20 by MarcelKinard)