use sdk 22 for gradle builds too; rename apk file based on git revision number

This commit is contained in:
Eric House 2016-02-25 21:20:17 -08:00
parent ca41a2390c
commit b8c98487d7
2 changed files with 11 additions and 2 deletions

View file

@ -19,7 +19,7 @@ android {
buildToolsVersion "22.0.1"
defaultConfig {
minSdkVersion 7
targetSdkVersion 14
targetSdkVersion 22
}
// Rename all output artifacts to include version information
@ -103,6 +103,15 @@ android {
lintOptions {
abortOnError false
}
def gitrev = "git describe --tags".execute().text
applicationVariants.all { variant ->
variant.outputs.each { output ->
output.outputFile =
new File(output.outputFile.parent,
output.outputFile.name.replace(".apk", "-${gitrev}.apk"))
}
}
}
dependencies {

View file

@ -26,7 +26,7 @@ subprojects {
afterEvaluate {project ->
if (project.hasProperty("android")) {
android {
compileSdkVersion 14
compileSdkVersion 22
buildToolsVersion '22.0.1'
}
}