开发者

Compile Android project in Continuous Integration System Hudson?

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


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. ;)


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.


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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜