Skip to content

Commit

Permalink
debug builds now automatically get a '-debug' suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
sspanak committed Jan 6, 2025
1 parent 0aede2e commit f20c498
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
16 changes: 9 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:tools="http://schemas.android.com/tools"
android:versionCode="844"
android:versionCode="845"
android:versionName="43.0"
xmlns:android="http://schemas.android.com/apk/res/android">

Expand Down

0 comments on commit f20c498

Please sign in to comment.