File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,6 +37,13 @@ android {
3737 targetSdk = flutter. targetSdkVersion
3838 versionCode = flutter. versionCode
3939 versionName = flutter. versionName
40+
41+ // abiFilters cannot be present when splits abi filters are set
42+ ndk {
43+ if (! splits. abi. enable) {
44+ abiFilters ' arm64-v8a' , ' armeabi-v7a'
45+ }
46+ }
4047 }
4148
4249 dependencies {
@@ -70,4 +77,16 @@ android {
7077
7178flutter {
7279 source = " ../.."
80+ }
81+
82+ // ABI-specific version code configuration
83+ ext. abiCodes = [" x86_64" : 1 , " armeabi-v7a" : 2 , " arm64-v8a" : 3 ]
84+ import com.android.build.OutputFile
85+ android. applicationVariants. all { variant ->
86+ variant. outputs. each { output ->
87+ def abiVersionCode = project. ext. abiCodes. get(output. getFilter(OutputFile . ABI ))
88+ if (abiVersionCode != null ) {
89+ output. versionCodeOverride = variant. versionCode + abiVersionCode
90+ }
91+ }
7392}
You can’t perform that action at this time.
0 commit comments