Last active
April 14, 2016 06:53
-
-
Save Hackforid/0478c4196d39c2bcf1a4a055c7b6d395 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// format name | |
android.applicationVariants.all { variant -> | |
variant.outputs.each { output -> | |
if (output.outputFile != null && output.outputFile.name.endsWith('.apk')) { | |
def outputName = "Danjuan-" + versionName + "-" + output.outputFile.name | |
outputName = outputName.replace(' ', '') | |
def file = output.outputFile | |
output.outputFile = new File(file.parent, outputName) | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// From http://stackoverflow.com/questions/19172565/how-append-date-build-to-versionnamesuffix-on-gradle | |
beta { | |
packageNameSuffix ".beta" | |
versionNameSuffix "-beta" + "-build" + getDate() | |
signingConfig signingConfigs.debug | |
} | |
def getDate() { | |
def date = new Date() | |
def formattedDate = date.format('yyyyMMddHHmmss') | |
return formattedDate | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// skip the lint check permanently from your incremental builds | |
tasks.whenTaskAdded { task -> | |
if (task.name.equals("lint")) { | |
task.enabled = false | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment