Bump Companion version
This commit is contained in:
parent
ef67065617
commit
2dae738d5b
1 changed files with 31 additions and 0 deletions
31
build.gradle
31
build.gradle
|
|
@ -82,11 +82,42 @@ def gmsVersion = "24.10.17"
|
|||
def gmsVersion = "24.09.13"
|
||||
>>>>>>> ef113281 (Bump GMS version to 24.09.13 (#2191))
|
||||
def gmsVersionCode = Integer.parseInt(gmsVersion.replaceAll('\\.', ''))
|
||||
<<<<<<< HEAD
|
||||
|
||||
def ourVersionBase = "0.3.0"
|
||||
|
||||
def ourVersionCode = gmsVersionCode * 1000
|
||||
def ourVersionName = "$ourVersionBase.$gmsVersionCode"
|
||||
=======
|
||||
def vendingVersion = "40.2.26"
|
||||
def vendingVersionCode = Integer.parseInt(vendingVersion.replaceAll('\\.', ''))
|
||||
def gitVersionBase = execResult('git', 'describe', '--tags', '--abbrev=0', '--match=v[0-9]*').trim().substring(1)
|
||||
def gitCommitCount = Integer.parseInt(execResult('git', 'rev-list', '--count', "v$gitVersionBase..HEAD").trim())
|
||||
def gitCommitId = execResult('git', 'show-ref', '--abbrev=7', '--head', 'HEAD').trim().split(' ')[0]
|
||||
def gitDirty = false
|
||||
execResult('git', 'status', '--porcelain').lines().each { stat ->
|
||||
def status = stat.substring(0,2)
|
||||
def file = stat.substring(3)
|
||||
if (status == '??') {
|
||||
if (subprojects.any { p -> file.startsWith(p.name + '/') }) {
|
||||
logger.lifecycle('Dirty file: {} (untracked)', file)
|
||||
gitDirty = true
|
||||
} else {
|
||||
logger.info('New file outside module: {} (ignored for dirty check)', file)
|
||||
}
|
||||
} else {
|
||||
logger.lifecycle('Dirty file: {} (changed)', file)
|
||||
gitDirty = true
|
||||
}
|
||||
}
|
||||
def ourVersionBase = gitVersionBase.substring(0, gitVersionBase.lastIndexOf('.'))
|
||||
def ourVersionMinor = Integer.parseInt(ourVersionBase.substring(ourVersionBase.lastIndexOf('.') + 1))
|
||||
def ourGmsVersionCode = gmsVersionCode * 1000 + ourVersionMinor * 2 + (gitCommitCount > 0 || gitDirty ? 1 : 0)
|
||||
def ourGmsVersionName = "$ourVersionBase.$gmsVersionCode" + (gitCommitCount > 0 && !gitDirty ? "-$gitCommitCount" : "") + (gitDirty ? "-dirty" : "") + (gitCommitCount > 0 && !gitDirty ? " ($gitCommitId)" : "")
|
||||
def ourVendingVersionCode = 80000000 + vendingVersionCode * 100 + ourVersionMinor * 2 + (gitCommitCount > 0 || gitDirty ? 1 : 0)
|
||||
def ourVendingVersionName = "$ourVersionBase.$vendingVersionCode" + (gitCommitCount > 0 && !gitDirty ? "-$gitCommitCount" : "") + (gitDirty ? "-dirty" : "") + (gitCommitCount > 0 && !gitDirty ? " ($gitCommitId)" : "")
|
||||
logger.lifecycle('Starting build for GMS version {} ({})...', ourGmsVersionName, ourGmsVersionCode)
|
||||
>>>>>>> 33109df6 (Bump Companion version)
|
||||
|
||||
allprojects {
|
||||
apply plugin: 'idea'
|
||||
|
|
|
|||
Loading…
Reference in a new issue