6

I'm setting up a Continuous Integrations System with Hudson and it's just amazing. I got a SVN repository and integrated a post-commit hook that notifies Hudson when someone commits to the repository. This part is working splendid.

The general idea is, that if the project fails, with unit-tests or anything else, it should tell the collaborator(i'm using a simple e-mail notifier atm). But if it successes I want it to compile the project and build either an unsigned or a signed .apk file.

What's the easiest or smartest way to do this? I've read you can use a Shell Command to build the .apk but I can't seem to figure out how this works? Can anyone tell me how I can do this or should I go for another solution?

Thanks in advance

Finn Larsen

Finn Larsen
  • 2,236
  • 15
  • 26

3 Answers3

6

There is a guide on the Jenkins wiki about building Android apps with Hudson or Jenkins, including building and running a test app, obtaining code coverage and static analysis stats.
Essentially you can use the Ant support built-in to build your application.

If you want to run automated tests, you can also use the Android Emulator Plugin.

Since you're just starting out with Hudson, I would say now is a good time to upgrade to Jenkins. ;)

Community
  • 1
  • 1
Christopher Orr
  • 106,059
  • 26
  • 192
  • 189
  • That was a easy to switch from Hudson to Jenkins and just by reading the headings and a snippets of that thread, I'm sure it's a great Idea. I'm planing to use that plugin as well but i'm not quite there yet :P Thanks. – Finn Larsen Sep 26 '11 at 09:03
2

As far as I remeber hudson supports ant's builds. And android apps can be built using ant use this link for more info about building android apps with ant. Be aware that you'll have to install Android SDK on your build agent.

Nikolay Ivanov
  • 8,637
  • 3
  • 29
  • 33
2

Android provides ant build script. So, you can make apk easily.

  1. install android-sdk in hudson server
  2. install ant in hudson server ( ant version should be > 1.8 )
  3. in hudson, call cmd android update project -p <PATH to your project>
  4. in hudson, call ant debug. debug target generates debug apk build
kingori
  • 2,018
  • 22
  • 27