Merge branch 'master' of https://github.com/Anuken/Mindustry into 4.0

This commit is contained in:
Anuken
2018-04-25 20:53:49 -04:00
2 changed files with 17 additions and 6 deletions

View File

@@ -42,18 +42,26 @@ android {
defaultConfig {
def vfile = file('../core/assets/version.properties')
def props = new Properties()
props.load(new FileInputStream(vfile))
def code = props['androidBuildCode'].toInteger() + 1
props['androidBuildCode'] = code.toString()
props.store(vfile.newWriter(), "Autogenerated file. Do not modify.")
def code = 0
def versionNameResult = "unknown"
if(vfile.exists()){
def props = new Properties()
props.load(new FileInputStream(vfile))
code = (props['androidBuildCode'] == null ? 0 : props['androidBuildCode']).toInteger() + 1
props['androidBuildCode'] = code.toString()
props.store(vfile.newWriter(), "Autogenerated file. Do not modify.")
versionNameResult = "$versionNumber-$versionType-${props['build'].replace(" ", "-")}"
}
applicationId "io.anuke.mindustry"
minSdkVersion 9
targetSdkVersion 27
versionCode code
versionName "$versionNumber-$versionType-${props['build'].replace(" ", "-")}"
versionName versionNameResult
}
compileOptions {