From e50432c07e220ca3dbe51364bf8ea95add45949e Mon Sep 17 00:00:00 2001 From: rafal1137 Date: Mon, 8 Mar 2021 16:54:30 +0100 Subject: [PATCH] gradle: added git versioning plugin This will allow building packages with some infomations from git. --- app/build.gradle | 17 +++++++++++++++-- build.gradle | 4 ++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index fc1e156..5f02c21 100755 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,6 +7,19 @@ else { apply plugin: 'com.android.library' } +versionberg { + // Increase when you make incompatible API changes (default value is 0) + major 2 + // Increase when you add functionality in a backwards-compatible manner (default value is 0) + minor 77 + // Increase when you make backwards-compatible bug fixes (default value is 0) + patch 0 + // default is ${commitCount}, uncomment to use a custom build number + // build 2 + // Default version name template is '${major}.${minor}.${patch}.${build}' + nameTemplate '${major}.${minor}-${commitCount}-${commitSha}' +} + android { compileSdkVersion 26 defaultConfig { @@ -16,8 +29,8 @@ android { minSdkVersion 21 targetSdkVersion 26 versionCode 1 - versionName "1.0" - setProperty("archivesBaseName", "ETLegacy v-$versionName") + versionName versionberg.name + setProperty("archivesBaseName", "ETLegacy v$versionName") externalNativeBuild { cmake { arguments "-DCROSS_COMPILE32=OFF", "-DFEATURE_RENDERER2=OFF", "-DFEATURE_RENDERER_GLES=ON", "-DBUILD_SERVER=OFF", "-DINSTALL_EXTRA=OFF", "-DCMAKE_BUILD_TYPE=Release", "-DBUNDLED_LIBS=OFF", "-DFEATURE_LUA=OFF", "-DFEATURE_OPENAL=OFF", "-DFEATURE_FREETYPE=OFF", "-DRENDERER_DYNAMIC=OFF", "-DBUNDLED_THEORA=OFF", "-DFEATURE_THEORA=OFF", "-DFEATURE_PNG=OFF", "-DFEATURE_SSL=OFF" diff --git a/build.gradle b/build.gradle index 5ea9881..3e971ea 100644 --- a/build.gradle +++ b/build.gradle @@ -13,6 +13,10 @@ buildscript { } } +plugins { + id "io.github.rockerhieu.versionberg" version "1.0.2" +} + allprojects { repositories { jcenter()