From c239233bbea90381e148de2e304bf09f1184ec2e Mon Sep 17 00:00:00 2001 From: sspanak Date: Tue, 13 Feb 2024 19:39:11 +0200 Subject: [PATCH] automatic APK name --- app/build.gradle | 8 ++++++-- app/constants.gradle | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 394e8e37..920cb282 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -51,11 +51,11 @@ def getVersionString = { flavor -> return flavor == 'debug' ? getDebugVersion() android { - namespace 'io.github.sspanak.tt9' + namespace PACKAGE_NAME compileSdk 34 defaultConfig { - applicationId "io.github.sspanak.tt9" + applicationId PACKAGE_NAME minSdk 19 //noinspection ExpiredTargetSdkVersion targetSdk 30 @@ -100,6 +100,10 @@ android { assembleDebug.finalizedBy(updateManifest) assembleRelease.finalizedBy(updateManifest) + + variant.outputs.configureEach { + outputFileName = "${APP_NAME}-v${getVerName()}.apk" + } } } diff --git a/app/constants.gradle b/app/constants.gradle index 31020444..8bfe5eee 100644 --- a/app/constants.gradle +++ b/app/constants.gradle @@ -1,3 +1,6 @@ +ext.APP_NAME = 'tt9' +ext.PACKAGE_NAME = "io.github.sspanak.${APP_NAME}" + ext.LANGUAGES_DIR_NAME = 'languages' ext.DEFINITIONS_DIR_NAME = 'definitions' ext.DICTIONARIES_DIR_NAME = 'dictionaries'