Vielleicht hilft dir das weiter, TextSecure beschreibt das in seiner Doku mit Gradle How to build TextSecure from the sources · WhisperSystems/TextSecure Wiki · GitHub
Von damals habe ich noch diese URL in meinen Favoriten, falls es dir helfen sollte, kommt noch aus 1.5 Zeiten glaub ich: How to build Android application package (.apk) from the command line using the SDK tools + continuously integrated using CruiseControl. | simple blog