[mono-android] Mono for Android and NAnt
Tom Opgenorth
tom at opgenorth.net
Wed Jun 27 13:39:22 UTC 2012
Yup, I know you can include the signing information in the csproj. However,
that involves including password for your private key in a plain text file
which will be stored in version control. You don't want your password out
there for everybody who fetches your code from source code control - not a
good idea.
On Wed, Jun 27, 2012 at 2:54 AM, Matthew Leibowitz <mattleibowmail at gmail.com
> wrote:
> Thanks Guys,
>
> I got NAnt working with the Builds.
>
> Matt, I see you do the Align after the build, is this really necessary as
> the default SignAndroidPackage target already does this.
> Tom, You can also include the signing information in the project file:
> http://docs.xamarin.com/android/tutorials/Preparing_Package_for_Android_Marketplace#Step_4.3a_Sign_the_Package
>
> Thanks again,
> Matthew
>
>
> On Wed, Jun 27, 2012 at 7:15 AM, Tom Opgenorth <tom at opgenorth.net> wrote:
>
>> 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
>>
>> _______________________________________________
>> Monodroid mailing list
>> Monodroid at lists.ximian.com
>>
>> UNSUBSCRIBE INFORMATION:
>> http://lists.ximian.com/mailman/listinfo/monodroid
>>
>>
>
> _______________________________________________
> 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/20120627/ee1280c4/attachment.html>
More information about the Monodroid
mailing list