|
@@ -1,13 +1,18 @@
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
|
|
+def cmd = 'git rev-list HEAD --first-parent --count'
|
|
|
+def gitVersion = cmd.execute().text.trim().toInteger()
|
|
|
+def cmd2 = 'git describe --tags'
|
|
|
+def version = cmd2.execute().text.trim()
|
|
|
+
|
|
|
android {
|
|
|
compileSdkVersion 28
|
|
|
defaultConfig {
|
|
|
applicationId "me.yoqi.calculator"
|
|
|
minSdkVersion 15
|
|
|
targetSdkVersion 28
|
|
|
- versionCode 11
|
|
|
- versionName "1.0.1"
|
|
|
+ versionCode gitVersion
|
|
|
+ versionName version
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
|
}
|
|
|
buildTypes {
|
|
@@ -16,6 +21,7 @@ android {
|
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
|
|
|
dependencies {
|