[
https://issues.apache.org/jira/browse/CB-7665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14152506#comment-14152506
]
Michael Brooks edited comment on CB-7665 at 9/30/14 4:12 PM:
-------------------------------------------------------------
Hi [~websteve],
I thought I'd chime-in on how I've done Android releases in the past using the
{{--release}} flag. It's not exactly straight-forward, because Cordova has not
yet created a unified way to define signing keys to build a release.
First off, I'd recommending reading through the [Preparing for a
Release|http://developer.android.com/tools/publishing/preparing.html] guides on
Android's Developer page. The most important section is _Building with Ant_
near the bottom of the page.
The release flag essentially calls the {{ant release}} task. So, by setting up
the Android project to build signed releases with {{ant release}}, then the
{{--release}} flag will also build signed releases. The [Building in Release
Mode|http://developer.android.com/tools/building/building-cmdline.html#ReleaseMode]
guide will explain how to setup your project to automatically sign and align
your application using your specified keystore and alias.
Personally, I don't like to store my signing keys in my project. In open source
applications, such as the _PhoneGap Developer App_, I [reference the keys in an
external
directory|https://github.com/phonegap/phonegap-app-developer/blob/master/platforms/android/project.properties#L21-L22].
Your team can then share the signing key directory however you want.
was (Author: mwbrooks):
Hi [~shuston],
I thought I'd chime-in on how I've done Android releases in the past using the
{{--release}} flag. It's not exactly straight-forward, because Cordova has not
yet created a unified way to define signing keys to build a release.
First off, I'd recommending reading through the [Preparing for a
Release|http://developer.android.com/tools/publishing/preparing.html] guides on
Android's Developer page. The most important section is _Building with Ant_
near the bottom of the page.
The release flag essentially calls the {{ant release}} task. So, by setting up
the Android project to build signed releases with {{ant release}}, then the
{{--release}} flag will also build signed releases. The [Building in Release
Mode|http://developer.android.com/tools/building/building-cmdline.html#ReleaseMode]
guide will explain how to setup your project to automatically sign and align
your application using your specified keystore and alias.
Personally, I don't like to store my signing keys in my project. In open source
applications, such as the _PhoneGap Developer App_, I [reference the keys in an
external
directory|https://github.com/phonegap/phonegap-app-developer/blob/master/platforms/android/project.properties#L21-L22].
Your team can then share the signing key directory however you want.
> Release process for Google Play has no documentation, requires guesswork!
> --------------------------------------------------------------------------
>
> Key: CB-7665
> URL: https://issues.apache.org/jira/browse/CB-7665
> Project: Apache Cordova
> Issue Type: Improvement
> Components: Android, CLI, Docs
> Affects Versions: 3.5.0
> Environment: Mac OS X Lion
> Reporter: Steve Husting
> Labels: patch
> Fix For: 3.5.0
>
>
> I output my myApp version 12 project with: cordova build android --release
> It was output as myApp/platforms/android/ant-build/myApp-release-unsigned.apk
> I changed the name to the final apk name: myApp-release-unsigned.apk =
> myApp.apk
> I copied the myApp.keystore file used on earlier myApps to the same folder.
> Starting with that folder, I ran: jarsigner -verbose -sigalg SHA1withRSA
> -digestalg SHA1 -keystore myApp.keystore myApp.apk myApp
> I successfully verified it with: jarsigner -verify -verbose -certs myApp.apk
> When I uploaded the myApp.apk to Google Play, it said that the file needed to
> be zipaligned.
> The verbose output shows zipalign being done. So is there a bug when the apk
> is made via cordova build android --release?
> Is there a step missing that I should be taking? Unfortunately, all the
> instructions for this on the Internet assume I'm not using Cordova.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)