aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2017-04-10 12:37:23 +0100
committerDave Arter <davea@mysociety.org>2017-04-10 12:37:23 +0100
commitc47afcc156d18c006347cb2d584cc08e5bd8f1dc (patch)
tree2f4bdd78e44bba4fca63117caa37ad486955acb3
parent26b0de5818b2aacfae60b7d6fcfccf370c1ed294 (diff)
Update Android build instructions to automatically sign/align APK
-rw-r--r--.gitignore1
-rw-r--r--README.md23
-rw-r--r--build.json-example8
3 files changed, 14 insertions, 18 deletions
diff --git a/.gitignore b/.gitignore
index ef64695..0d54681 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,3 +14,4 @@ plugins
compiled
locale/lang_list
/config.xml
+/build.json
diff --git a/README.md b/README.md
index 3e7a300..dfae216 100644
--- a/README.md
+++ b/README.md
@@ -155,24 +155,11 @@ Releasing
### Android
To release the app on Android, you need to do the following:
-1. Change your config.js to include production settings
-2. Bump the version code in config.xml, both the main one and the android specific one
-2. Build a release version of the app: `cordova build android --release`
-3. Sign that `.apk` (the cordova command tells you where it put it):
- 1. Clone the mySociety keys repository
- 2. `cd` into the folder containing your new release `.apk`
- 3. Sign the .apk with our key: `jarsigner -verbose -keystore <path-to-keys-repo>keys/android/android_keystore -sigalg SHA1withRSA -digestalg SHA1 ZuriWieNeu-release-unsigned.apk fixmyzurich` Double check that you're signing the right .apk here as there
- will be debug ones too.
-
- This will ask first for a password for the keystore (it's in the usual place
- if you're a mysociety developer), then a password for the app specific key,
- (`fixmyzurich` in the command above is a special shortname for the app that
- identifies which key to use.)
-4. Verify that the signing was ok: `jarsigner -verify -verbose -certs ZuriWieNeu-release-unsigned.apk` (The signing doesn't change the name of your `.apk`). You should
-see `sm` next to every file.
-5. Align the `.apk` using `zipalign` (Note, you might have to manually find `zipalign` in `build-tools` inside the sdk-folder): `zipalign -v 4 ZuriWieNeu-release-unsigned.apk ZuriWieNeu.apk`
-
-Note: most of this comes from: http://developer.android.com/tools/publishing/app-signing.html#signing-manually, you can also do it via Eclipse or Android Studio if you wish.
+ 1. Change your `config.js` to include production settings
+ 1. Bump the version code in `config.xml`, both the main one and the android specific one
+ 1. Clone the mySociety keys repository
+ 1. Copy `build.json-example` to `build.json` and edit it to point at the android keystore in the keys repo
+ 1. Build a release version of the app: `cordova build android --release`
### iOS
diff --git a/build.json-example b/build.json-example
new file mode 100644
index 0000000..2af1da6
--- /dev/null
+++ b/build.json-example
@@ -0,0 +1,8 @@
+{
+ "android": {
+ "release": {
+ "keystore": "/Users/davea/Code/keys/android/android_keystore",
+ "alias": "cuidomiciudad"
+ }
+ }
+}