From b71984d5d86c55cbf412e8c18933e965ab719b30 Mon Sep 17 00:00:00 2001 From: Ammar Githam Date: Fri, 26 Mar 2021 22:30:55 +0900 Subject: [PATCH] Custom apk name for github flavor and git ignore android studio flavor release folders. --- .gitignore | 4 +++- app/build.gradle | 12 ++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index d849b086..6b4a96c1 100755 --- a/.gitignore +++ b/.gitignore @@ -17,4 +17,6 @@ .externalNativeBuild .cxx app/release -/sentry.properties \ No newline at end of file +/sentry.properties +/app/fdroid/ +/app/github/ diff --git a/app/build.gradle b/app/build.gradle index 1f92ed58..92252e00 100755 --- a/app/build.gradle +++ b/app/build.gradle @@ -64,6 +64,18 @@ android { versionNameSuffix "-fdroid" } } + + android.applicationVariants.all { variant -> + if (variant.flavorName != "github") return + variant.outputs.all { output -> + def builtType = variant.buildType.name + def versionName = variant.versionName + // def versionCode = variant.versionCode + // def flavor = variant.flavorName + // flavor is already appended to versionName due to versionNameSuffix + outputFileName = "barinsta_${versionName}_${builtType}.apk" + } + } } configurations.all {