4

What I have: An IntelliJ Idea Android project stored on a Git server; TeamCity is configured to have an "IntelliJ Idea project" as a Runner type. The project itself is stored on Git with all project-related iml's and xml's: you can just download it, open and press "run", the project gets compiled, an .apk gets placed in the out/production folder.

What I want: TeamCity to generate an .apk in addition to .class files and place it in the out/production folder

The question: how do I achieve that? Is there a specific setting telling TeamCity that this is an Android project, apart from Idea's project configs?

P.S. Android SDK, dependencies, JDK are all configured correctly, as the project gets compiled successfully. The only issue is that the .apk doesn't get generated.

Alex Timonin
  • 1,872
  • 18
  • 31

2 Answers2

5

In case anyone faces the same problem: You have to explicitly declare an artifact (Project Settings -> Artifacts) of an "Android Application" type, and then list its name in TeamCity's Build Step Config.

Alex Timonin
  • 1,872
  • 18
  • 31
  • 4
    Alex, can you provide more detailed answer (screenshots would be too much to ask? ;)). Where do you exactly declare Artifacts? And what exactly do you put in TeamCity's Build Step Config? Thanks in advance for your help! – nikib3ro Mar 15 '16 at 04:42
5

To output all "Android Application" (apk) files you can specify +:**/*.apk in the Artifact paths under General Settings for a Build Configuration:

enter image description here

koocbor
  • 333
  • 1
  • 3
  • 12