diff --git a/android/build.gradle b/android/build.gradle index 44e562d..de68a81 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -20,13 +20,22 @@ allprojects { apply plugin: 'com.android.application' +def getVersionName = { -> + def stdout = new ByteArrayOutputStream() + exec { + commandLine 'git', 'describe', '--tags', '--dirty' + standardOutput = stdout + } + return stdout.toString().trim() +} + android { compileSdkVersion 29 defaultConfig { minSdkVersion 23 targetSdkVersion 29 versionCode 5 - versionName "0.1.5" + versionName getVersionName() } compileOptions { sourceCompatibility 1.8