From f20c49825244d72b722231166c91fb301935c23a Mon Sep 17 00:00:00 2001 From: sspanak Date: Mon, 6 Jan 2025 11:40:44 +0200 Subject: [PATCH] debug builds now automatically get a '-debug' suffix --- app/build.gradle | 16 +++++++++------- app/src/main/AndroidManifest.xml | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 7df03956a..70651292c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -130,12 +130,13 @@ android { } applicationVariants.configureEach { variant -> + def variantName = variant.name.capitalize() [ - "merge${variant.name.capitalize()}Assets", - "lintAnalyze${variant.name.capitalize()}", - "generate${variant.name.capitalize()}LintReportModel", - "lintVitalAnalyze${variant.name.capitalize()}", - "generate${variant.name.capitalize()}LintVitalReportModel" + "merge${variantName}Assets", + "lintAnalyze${variantName}", + "generate${variantName}LintReportModel", + "lintVitalAnalyze${variantName}", + "generate${variantName}LintVitalReportModel" ].each { taskName -> try { tasks.named(taskName)?.configure { @@ -154,8 +155,9 @@ android { assembleFullRelease.finalizedBy(updateManifest) variant.outputs.configureEach { - def suffix = variant.flavorName == 'full' ? '-full' : '' - outputFileName = "${APP_NAME}-v${getVerName()}${suffix}.apk" + def fullSuffix = variant.flavorName == 'full' ? '-full' : '' + def debugSuffix = variant.name.containsIgnoreCase('debug') ? '-debug' : '' + outputFileName = "${APP_NAME}-v${getVerName()}${fullSuffix}${debugSuffix}.apk" } } } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 7c3460fcd..f0cbcd397 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,6 +1,6 @@