get versionCode & name from tag

This commit is contained in:
CiufudeanDani 2022-03-22 12:11:08 +02:00
parent bca16caf94
commit bbed107c42
2 changed files with 17 additions and 3 deletions

View File

@ -1,5 +1,19 @@
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
apply plugin: 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin' apply plugin: 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin'
apply plugin: "com.gladed.androidgitversion"
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
mavenCentral()
}
dependencies {
classpath "gradle.plugin.com.gladed.gradle.androidgitversion:gradle-android-git-version:0.4.3"
}
}
android { android {
compileSdkVersion 31 compileSdkVersion 31
@ -9,6 +23,8 @@ android {
applicationId "com.safemobile.dispatch" applicationId "com.safemobile.dispatch"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 31 targetSdkVersion 31
versionName androidGitVersion.name()
versionCode androidGitVersion.code()
} }
buildTypes { buildTypes {

View File

@ -1,9 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
package="com.safemobile.dispatch" package="com.safemobile.dispatch">
android:versionCode="9"
android:versionName="1.0.9">
<!-- require OpenGL ES version 2 for Google Maps --> <!-- require OpenGL ES version 2 for Google Maps -->
<uses-feature <uses-feature