TWilly
TWilly

Reputation: 4933

Build Android Project with TFS and Gradle

I just migrated to Android Studio and am trying to move over to using the gradle build system for continous integration on our server hosting Team Foundation Server.

Before I was able to create android builds with TFS using the ant and the AntBuildFile tag via MSBuild.
http://stefan.samaflost.de/repos/anttask/doc.xhtml

Is there a way to kick off a gradle build via TFS similar to how I was doing this for ant??

I saw this plugin which allows you to deploy to azure cloud services via gradle.
https://github.com/MSOpenTech/TFS-Gradle-plugin However, I just need something as simple as running "gradle assembleRelease" in the correct directory.

I'm running TFS 2013.

Thanks!

Upvotes: 3

Views: 1580

Answers (1)

TWilly
TWilly

Reputation: 4933

It was as simple as switching over to the exec msbuild command and calling gradle.

<Target Name="Build" >      
    <Exec  Command='"$(GRADLE_HOME)/bin/gradle" assembleRelease' WorkingDirectory="$(MSBuildProjectDirectory)/../../AlpineMetricsAndroidApp/Branch_2_1_0/platforms/android"   />
</Target>

Upvotes: 3

Related Questions