From bbed107c427a8e8bbf1d8802c94d1e296369bcde Mon Sep 17 00:00:00 2001 From: CiufudeanDani Date: Tue, 22 Mar 2022 12:11:08 +0200 Subject: [PATCH] get versionCode & name from tag --- safeDispatch/build.gradle | 16 ++++++++++++++++ safeDispatch/src/main/AndroidManifest.xml | 4 +--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/safeDispatch/build.gradle b/safeDispatch/build.gradle index 216ff1d..fe3e81a 100644 --- a/safeDispatch/build.gradle +++ b/safeDispatch/build.gradle @@ -1,5 +1,19 @@ apply plugin: 'com.android.application' 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 { compileSdkVersion 31 @@ -9,6 +23,8 @@ android { applicationId "com.safemobile.dispatch" minSdkVersion 21 targetSdkVersion 31 + versionName androidGitVersion.name() + versionCode androidGitVersion.code() } buildTypes { diff --git a/safeDispatch/src/main/AndroidManifest.xml b/safeDispatch/src/main/AndroidManifest.xml index 6489df7..7e09470 100644 --- a/safeDispatch/src/main/AndroidManifest.xml +++ b/safeDispatch/src/main/AndroidManifest.xml @@ -1,9 +1,7 @@ + package="com.safemobile.dispatch">