Both versionCode for the build and CurrentVersionCode fields are set to 1. Commit codes of the release and metadata match. When I build locally outside of the test container, I get the correct version code. I have no idea where that 2001 comes from.
I built the APK locally and checked it using aapt, and it was 1. But now I’m not sure if I used the exact same commands. I’ll check when I get back home.
Do you happen to have a link for documentation of this behaviour?
I would need to figure out how to create multiple apks per build. Does F-Droid even support this? I read build metadata of a few Flutter apps, none of them used split apks.
More importantly, I would need to handle a seemingly undocumented behaviour of Flutter build tooling.
Below is Kotlin DSL equivalet that I could come up with (untested):
val abiCodes = mapOf(
"armeabi-v7a" to 1,
"arm64-v8a" to 2,
"x86_64" to 3,
)
applicationVariants.configureEach {
outputs.configureEach {
val abiCode = abiCodes[filters.find { it.filterType == OutputFile.ABI }?.identifier] ?: 0
(this as? ApkVariantOutputImpl)?.versionCodeOverride = versionCode * 10 + abiCode
}
}
But, please bear with me, I’m asking as a non-developer trying to do this right: ApkVariantOutputImpl is internal api and OutputFile and its parent interface (where that ABI constant is defined) are depreciated. Is this better than just using the Flutter tooling already does (can I?)? After all, It seems to me I would be replacing something undocumented with something unsupported/internal.