Improvements to version scripts
This commit is contained in:
+7
-19
@@ -50,8 +50,8 @@ task deploy(type: Copy){
|
||||
}
|
||||
|
||||
android{
|
||||
buildToolsVersion '28.0.3'
|
||||
compileSdkVersion 28
|
||||
buildToolsVersion '29.0.2'
|
||||
compileSdkVersion 29
|
||||
sourceSets{
|
||||
main{
|
||||
manifest.srcFile 'AndroidManifest.xml'
|
||||
@@ -70,27 +70,15 @@ android{
|
||||
}
|
||||
|
||||
defaultConfig{
|
||||
def vfile = file('../core/assets/version.properties')
|
||||
|
||||
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(" ", "-")}"
|
||||
}
|
||||
Integer vcode = new Properties().with{p -> p.load(new FileInputStream(file('../core/assets/version.properties'))); return p }['androidBuildCode'].toInteger()
|
||||
def versionNameResult = "$versionNumber-$versionType-${getBuildVersion().replace(" ", "-")}"
|
||||
|
||||
applicationId "io.anuke.mindustry"
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 28
|
||||
versionCode code
|
||||
targetSdkVersion 29
|
||||
|
||||
versionName versionNameResult
|
||||
versionCode vcode
|
||||
}
|
||||
|
||||
compileOptions{
|
||||
|
||||
Reference in New Issue
Block a user