Skip to content

Commit

Permalink
修改应用配置
Browse files Browse the repository at this point in the history
  • Loading branch information
liunian committed Jan 27, 2018
1 parent bb65a59 commit 7e1edbd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,13 @@ android {
def timeStr = "_" + date.get(Calendar.YEAR) + (((date.get(Calendar.MONTH) + 1) >= 10 ? date.get(Calendar.MONTH) + 1 : "0" + (date.get(Calendar.MONTH) + 1))) + (date.get(Calendar.DAY_OF_MONTH) >= 10 ? date.get(Calendar.DAY_OF_MONTH) : "0" + date.get(Calendar.DAY_OF_MONTH)) + "_" + (date.get(Calendar.HOUR_OF_DAY) >= 10 ? date.get(Calendar.HOUR_OF_DAY) : "0" + date.get(Calendar.HOUR_OF_DAY)) + (date.get(Calendar.MINUTE) >= 10 ? date.get(Calendar.MINUTE) : "0" + date.get(Calendar.MINUTE)) + ".apk";
def fileName = "Android_${defaultConfig.versionName}_${defaultConfig.versionCode}_${variant.productFlavors[0].name}" + timeStr;
//是否为Jenkins打包,输出路径不同
def outDirectory
if ("true".equals(IS_JENKINS)) {
outDirectory = BUILD_PATH_JENKINS
output.outputFile = new File(outDirectory, fileName)
} else {
output.outputFile = new File(outputFile.parent, fileName)
outDirectory = outputFile.parent
}
output.outputFile = new File(outDirectory, fileName)

}
}
Expand Down

0 comments on commit 7e1edbd

Please sign in to comment.