Skip to content

Commit

Permalink
updated gradle config for generated apk name
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Cesar Caballero Díaz committed May 7, 2017
1 parent 0142378 commit bd70090
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@ android {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
applicationVariants.all { variant ->
variant.outputs.each { output ->
project.ext { appName = 'FotoRecarga' }
// def formattedDate = new Date().format('yyyyMMddHHmmss')
def newName = output.outputFile.name
newName = newName.replace("app-", "$project.ext.appName-")
newName = newName.replace("-release", "-" + "$versionName")
//noinspection GroovyAssignabilityCheck
output.outputFile = new File(output.outputFile.parent, newName)
}
}
}
}
productFlavors {
Expand Down

0 comments on commit bd70090

Please sign in to comment.