Skip to content

Commit

Permalink
FIX:自动添加版本号
Browse files Browse the repository at this point in the history
  • Loading branch information
warmthdawn committed Jan 12, 2021
1 parent 19a537b commit 520af8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ group = 'com.warmthdawn.mod.gugu-utils' // http://maven.apache.org/guides/mini/g
archivesBaseName = 'gugu-utils'

def build_number = getBuildNumber()
version += ".b" + build_number
version += "." + build_number



Expand Down Expand Up @@ -195,7 +195,7 @@ def getBuildNumber() {
def buildNumber = versionProps['BUILD_NUMBER'].toInteger()
def runTasks = gradle.startParameter.taskNames //仅在assembleRelease任务是增加版本号
if ('build' in runTasks) {
versionProps['BUILD_NUMBER'] = (++versionCode).toString()
versionProps['BUILD_NUMBER'] = (++buildNumber).toString()
versionProps.store(versionFile.newWriter(), null)
}
return buildNumber
Expand Down

0 comments on commit 520af8d

Please sign in to comment.