Skip to content

Commit 37f84f0

Browse files
committed
versionCode for productFlavors
1 parent b618b9f commit 37f84f0

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

app/build.gradle

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,13 @@ android {
155155
}
156156
productFlavors {
157157
__32bit {
158+
versionCode android.defaultConfig.versionCode * 10 + 1
158159
ndk {
159160
abiFilter "armeabi-v7a"
160161
}
161162
}
162163
__64bit {
164+
versionCode android.defaultConfig.versionCode * 10 + 2
163165
ndk {
164166
abiFilter "arm64-v8a"
165167
}
@@ -180,20 +182,6 @@ android {
180182
release {
181183
}
182184
}
183-
// applicationVariants are e.g. debug, release
184-
applicationVariants.all { variant ->
185-
variant.outputs.each { output ->
186-
// For each separate APK per architecture, set a unique version code as described here:
187-
// https://developer.android.com/studio/build/configure-apk-splits.html
188-
def versionCodes = ["armeabi-v7a": 1, "arm64-v8a": 2]
189-
def abi = output.getFilter(OutputFile.ABI)
190-
if (abi != null) { // null for the universal-debug, universal-release variants
191-
output.versionCodeOverride =
192-
defaultConfig.versionCode * 10 + versionCodes.get(abi)
193-
}
194-
195-
}
196-
}
197185
}
198186

199187
dependencies {

0 commit comments

Comments
 (0)