[mono-android] Mono for Android and NAnt

Tom Opgenorth tom at opgenorth.net
Wed Jun 27 05:15:39 UTC 2012


I actually do this with a short 4 line powershell script.  Not quite what
you asked for but figured it couldn't hurt to provide it.

M4A will produce two APK's for a Release build, one that is signed, and one
that is not signed. There are a couple of ways to resolve that issue.  I
just ignore the signed package that M4A produces and then sign with my own
keystore.

Here's the Powershell script, which I keep in the same directory as my
CSPROJ file:

# Clean the build
msbuild.exe net.opgenorth.esj.android.csproj /p:Configuration=Release
/t:Clean

# Do a release build of the project
msbuild.exe net.opgenorth.esj.android.csproj /p:Configuration=Release
/t:PackageForAndroid

# Run jarsigner with my keystore, not the debug keystore.
& 'C:\Program Files\Java\jdk1.6.0_24\bin\jarsigner.exe' -verbose -sigalg
MD5withRSA -digestalg SHA1  -keystore
U:/tom/work/KeyStores/opgenorth-release-key.keystore -signedjar
 ./bin/Release/net.opgenorth.esj-signed.apk
./bin/Release/net.opgenorth.esj.android.apk my_default_key

# Zipalign last.
& 'C:\Program Files\Android\android-sdk\tools\zipalign.exe' -f -v 4
./bin/Release/net.opgenorth.esj-signed.apk ./AlbertaEmploymentStandards.apk


On Tue, Jun 26, 2012 at 3:35 PM, Matthew Leibowitz <mattleibowmail at gmail.com
> wrote:

> Hi All,
>
> Just want to see if anyone has got a NAnt build script (and maybe the
> nant.exe.config) that builds (and signs the APK) a MfA solution.
>
> It will be a great help as my knowledge of NAnt is so low that
> its embarrassing.
> Hopefully I will be able to see the changes and learn the right things the
> first time :)
>
> Matthew
>
> _______________________________________________
> Monodroid mailing list
> Monodroid at lists.ximian.com
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
>
>


-- 
http://www.opgenorth.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/monodroid/attachments/20120626/3c25ce11/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build_and_sign_for_release.ps1
Type: application/octet-stream
Size: 634 bytes
Desc: not available
URL: <http://lists.ximian.com/pipermail/monodroid/attachments/20120626/3c25ce11/attachment.obj>


More information about the Monodroid mailing list