Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
罗孟伟 committed Apr 10, 2021
1 parent 8717879 commit e85ca84
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apply plugin: 'com.android.application'

def releaseTime() {
static def releaseTime() {
def date = new Date()
return date.format("yyyy-MM-dd") + "_" + date.format("hh-mm-ss")
return date.format("yyyy-MM-dd") + "_" + date.format("hhmmss")
}

android {
Expand Down Expand Up @@ -44,7 +44,7 @@ android {
def outputFile = output.outputFile
if (outputFile != null && outputFile.name.endsWith('.apk')) {
def time = releaseTime()
def fileName = getProject().name + "_" + variant.baseName + "_${time}.apk"
def fileName = getProject().name + "_${time}${"_" + versionName}.apk"
outputFileName = fileName
}
}
Expand Down
Binary file removed app/demo/app_2020_11_22_2210_2.6.0.apk
Binary file not shown.
Binary file added app/demo/app_2021-04-10_070127_2.6.1.apk
Binary file not shown.

0 comments on commit e85ca84

Please sign in to comment.