google / bundletool

Bundletool is a command-line tool to manipulate Android App Bundles
https://g.co/androidappbundle
Apache License 2.0
3.52k stars 385 forks source link

How to specify different minimal SDK versions for different abis in a bundle? #250

Closed danilabagroff closed 2 years ago

danilabagroff commented 2 years ago

I'm not sure at all that this is really possible, but due to some underlying bug I need to force just old androids use armv7a package despite the fact that device is armv8a based. I'm trying to achieve this by setting minimal SDK version to 23 for armv8a build and 21 version for amrv7a.

As far as I understand we have a single AndroidManifest and common target/minimal SDK versions in there are declared. Also, I am able to override these defaults in the build.gradle but only once for all abis.

— productFlavors with abiFilter gives me different aabundles as a result — via applicationVariants.all I'm able to override just versionCode, but not minimalSdkVersion

ymakhno commented 2 years ago

It is not possible with a single AAB, but you can produce two AABs with Android Gradle Plugin and use both of them in release on Google Play just ensure that version code for AAB with minSdk = 23 is higher than AAB with minSdk = 21.