Judging by the documentation, you just need to create a separate apk with libs for each separate platform:
An application that contains specific libraries designed for a specific processor architecture (for example, ARM EABI v7 or x86) is visible only on devices that support this architecture.
And I would also like to draw attention to the fact that each of these APKs should have a different versionCode :
Each app has the same version: the codeCode attribute. If you want to be able to do this, you can use it.
I think it's best to implement separate sets of libraries and versions using the Flavors mechanism, something like this:
android { ... def commonVersionCode = 10 productFlavors { armeabi { versionCode commonVersionCode } x86 { versionCode commonVersionCode + 1 } } }
That is, the main version number should be a multiple of 10, and the versions for specific platforms should be added to the main version 0, 1, 2, etc. Well, the library, respectively, scattered in folders appropriate flavor'am.