From 37f84f0399f955544b3037cefc911e515f6ffa46 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Tue, 3 Mar 2020 16:48:22 +0100 Subject: [PATCH] versionCode for productFlavors --- app/build.gradle | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 2efbff4f..f1dcb751 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -155,11 +155,13 @@ android { } productFlavors { __32bit { + versionCode android.defaultConfig.versionCode * 10 + 1 ndk { abiFilter "armeabi-v7a" } } __64bit { + versionCode android.defaultConfig.versionCode * 10 + 2 ndk { abiFilter "arm64-v8a" } @@ -180,20 +182,6 @@ android { release { } } - // applicationVariants are e.g. debug, release - applicationVariants.all { variant -> - variant.outputs.each { output -> - // For each separate APK per architecture, set a unique version code as described here: - // https://developer.android.com/studio/build/configure-apk-splits.html - def versionCodes = ["armeabi-v7a": 1, "arm64-v8a": 2] - def abi = output.getFilter(OutputFile.ABI) - if (abi != null) { // null for the universal-debug, universal-release variants - output.versionCodeOverride = - defaultConfig.versionCode * 10 + versionCodes.get(abi) - } - - } - } } dependencies {