mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-02 20:33:50 +07:00
Fixed android build errors
This commit is contained in:
parent
3ed6be1d6d
commit
6244551d69
@ -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 26
|
||||
versionCode code
|
||||
versionName "$versionNumber-$versionType-${props['build'].replace(" ", "-")}"
|
||||
versionName versionNameResult
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
|
Loading…
Reference in New Issue
Block a user