TelaSocial / companion

The companion app for mobile which will lead to first co-branded open source project, for FISL
1 stars 6 forks source link

Cordova build release mode misses plugin pieces #84

Open taboca opened 10 years ago

taboca commented 10 years ago

I am moving this to good to have since it's a workaround as documentation tip. https://github.com/taboca/companion-fisl/commit/dba2cf4f1cef6910e385095f5e91adb15591a7e5

Basically the release can be done if you do a ant release from the dist/cordova/platforms/android and get the release from the bin directory.

The problem is:

-1) gulp cordova:release does nothing related to release - which is fine / unrelated. 2) ./dist/cordova and cordova build --release does in fact a release, as unsigned. However, the jar file has the platform/android//res/xml/config.xml missing the section on plugins.

Investigation

It seems that Phonegap (I could not find the bugs on Cordova) has some bugs on these things with config.xml not picking up the necessary things - it relates to their "merges" as part of their build scripts. And/or the build script inclusions, such as the kind of inclusions that should come from a plugin xml instruction piece, for instance:

./dist/cordova/plugins/nl.x-services.plugins.calendar/plugin.xml

Which should in theory instruct the build scripts to copy its section:

      <config-file target="res/xml/config.xml" parent="/*">
         <feature name="Calendar">
            <param name="android-package" value="nl.xservices.plugins.Calendar" />
         </feature>
      </config-file>

To a target XML being the actual platform/android/res/xml.

This won't happen if you do in release mode with cordova build --release.

Workaround is:

ant release

From the platform/android. Get the ./bin/App-release-unsigned.apk, sign, align, and push.

fczuardi commented 10 years ago

The gulp task uses the API version of Cordova build, passing the option release. Which should in theory be the same thing as what command line cordova build --release does. And that is supposed to be a release.

Anyways, let's use the ant workaround for now

fczuardi commented 10 years ago

And for the record: calendar plugin works on the unsigned apk generated by the gulp task cordova:release for me.

taboca commented 10 years ago

Which is your cordova node/infra version on your system? On mine, it does nothing different of debug. It simply does not generate an unsigned apk.

m

On Sun, May 4, 2014 at 1:03 AM, Fabricio C Zuardi notifications@github.comwrote:

And for the record: calendar plugin works on the unsigned apk generated by the gulp task cordova:release for me.

— Reply to this email directly or view it on GitHubhttps://github.com/TelaSocial/companion/issues/84#issuecomment-42123539 .