mirror of
https://github.com/Eyre-S/Coeur-Morny-Cono.git
synced 2024-11-22 11:14:55 +08:00
修复构建脚本中 version delta 相关判断问题
- 现在如果 use_delta 为 false 则输出 BuildConfig.VERSION_DELTA 为 null
This commit is contained in:
parent
f362d08f34
commit
d8eb372063
@ -40,7 +40,7 @@ final String proj_application_main = "${proj_package}.ServerMain"
|
||||
|
||||
final String proj_version_base = VERSION
|
||||
final String proj_version_delta = VERSION_DELTA
|
||||
final String proj_version_use_delta = Boolean.parseBoolean(VERSION_DELTA)
|
||||
final boolean proj_version_use_delta = Boolean.parseBoolean(USE_DELTA)
|
||||
String proj_version = proj_version_base
|
||||
if (proj_version_use_delta) proj_version += "-δ${proj_version_delta}"
|
||||
if (proj_git) proj_version += "+git.${proj_commit.substring(0, 8)}" + (proj_clean?"":".δ")
|
||||
@ -120,7 +120,7 @@ buildConfig {
|
||||
packageName(proj_package)
|
||||
|
||||
buildConfigField('String', 'VERSION', "\"${proj_version}\"")
|
||||
buildConfigField('String', 'VERSION_DELTA', "\"${proj_version_delta}\"")
|
||||
buildConfigField('String', 'VERSION_DELTA', proj_version_use_delta ? "\"${proj_version_delta}\"" : "null")
|
||||
buildConfigField('String', 'CODENAME', "\"${proj_version_codename}\"")
|
||||
buildConfigField('long', 'CODE_TIMESTAMP', "${proj_code_time}L")
|
||||
buildConfigField('String', 'COMMIT', proj_git ? "\"${proj_commit}\"" : "null")
|
||||
|
Loading…
Reference in New Issue
Block a user