Added completely new build version system

This commit is contained in:
Anuken
2018-02-08 23:41:07 -05:00
parent 36afd9f140
commit 1f4a72d459
21 changed files with 210 additions and 128 deletions
+1 -3
View File
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.anuke.mindustry"
android:versionCode="71"
android:versionName="3.3b20" >
package="io.anuke.mindustry">
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
<uses-permission android:name="com.android.vending.BILLING" />
+34
View File
@@ -12,6 +12,14 @@ dependencies {
implementation 'org.sufficientlysecure:donations:2.5'
}
task deploy(type: Copy){
dependsOn "assembleRelease"
from "build/outputs/apk/google/release/android-google-release.apk"
into "../deploy/";
rename ("android-google-release.apk", appName + "-android-" + getVersionString() + ".apk");
}
android {
buildToolsVersion '26.0.2'
compileSdkVersion 26
@@ -31,10 +39,21 @@ android {
packagingOptions {
exclude 'META-INF/robovm/ios/robovm.xml'
}
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.")
applicationId "io.anuke.mindustry"
minSdkVersion 9
targetSdkVersion 26
versionCode code
versionName "$versionNumber-$versionType-${props['build'].replace(" ", "-")}"
}
compileOptions {
@@ -49,6 +68,21 @@ android {
buildConfigField "boolean", "DONATIONS_GOOGLE", "true"
}
}
signingConfigs {
release {
storeFile file(RELEASE_STORE_FILE)
storePassword RELEASE_STORE_PASSWORD
keyAlias RELEASE_KEY_ALIAS
keyPassword RELEASE_KEY_PASSWORD
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
}
// called every time gradle gets executed, takes the native dependencies of
// the natives configuration, and extracts them to the proper libs/ folders