Introduction

The service will by default use the Android default developer certificate to sign the artifact, so there is no need to configure the below until you wish to release your app. However, in order to build release-able binaries for Android you need a signing key (see Android Signing). The plugin will take care of uploading the keystore and then associating it with your application, but you need to configure the plugin with a few details first.

Creating a Self-Signed Key

Creating a self-signed key is easy and well documented in the guide on Android Developers. As documented on the PhoneGap Build site, you need to note down the alias, keystore password, key password and the location of your keystore.

Configuring the Plugin

Again, we re-use the server section of the settings file for storing the keystore details, as it has various advantages over specifing properties etc. (not least that the passwords/passphrases can be encrypted).

A valid server configuration would look like -

<server>
	<id>android-developer-certificate</id>
	<privateKey>${user.home}/android.keystore</privateKey>
	<passphrase>superSecretKeystorePassword</passphrase> 
	<username>alias_name</username> 
	<password>superSecretKeyPassword</password> 
</server>

Following the same pattern as authentication, you must configure the plugin with the server id (this id can also be set in the POM as a property or configuration parameter) -

<properties>
	<phonegap-build.android.server>android-developer-certificate</phonegap-build.android.server>
</properties>

Additionally you must also explicitly tell the configure the plugin in the project's POM to sign the artifact (by default the Android development certificate is used) -

<androidSign>true</androidSign>

It is possible to configure the above using properties but it is not recommended.

Configuring the Plugin for Distribution

The same distribution profile based certificate switch can be used for Android as was used for iOS.