From 64a3ef352fba6767f2aff8243e5a4d9dae12093b Mon Sep 17 00:00:00 2001 From: UjuiUjuMandan <125150101+UjuiUjuMandan@users.noreply.github.com> Date: Mon, 27 Jan 2025 06:41:34 +0000 Subject: [PATCH] move out applicationVariants.all --- android/app/build.gradle | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 16ab7ac..e29f83e 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -83,31 +83,31 @@ android { abiFilters "armeabi-v7a", "arm64-v8a", "x86_64" } signingConfig signingConfigs.release - applicationVariants.all { variant -> - variant.outputs.all { output -> - def abi = output.getFilter(com.android.build.OutputFile.ABI) - if (abi != null) { - outputFileName = "venera-${variant.versionName}-${abi}.apk" - def abiVersionCode = project.ext.abiCodes.get(abi) - if (abiVersionCode != null) { - versionCodeOverride = variant.versionCode * 10 + abiVersionCode - } - } else { - outputFileName = "venera-${variant.versionName}.apk" - versionCodeOverride = variant.versionCode * 10 - } - } - } } debug { ndk { abiFilters "armeabi-v7a", "arm64-v8a", "x86_64" } signingConfig signingConfigs.debug - applicationVariants.all { variant -> - variant.outputs.all { output -> - versionCodeOverride = variant.versionCode * 10 + 4 + } + } + + applicationVariants.all { variant -> + variant.outputs.all { output -> + def abi = output.getFilter(com.android.build.OutputFile.ABI) + if (variant.buildType.name == "release") { + if (abi != null) { + outputFileName = "venera-${variant.versionName}-${abi}.apk" + def abiVersionCode = project.ext.abiCodes.get(abi) + if (abiVersionCode != null) { + versionCodeOverride = variant.versionCode * 10 + abiVersionCode + } + } else { + outputFileName = "venera-${variant.versionName}.apk" + versionCodeOverride = variant.versionCode * 10 } + } else if (variant.buildType.name == "debug") { + versionCodeOverride = variant.versionCode * 10 + 4 } } }