I've a setup with buildkonfig library, with multiple variants. Following are the rough steps for the setup.
1. Create flavour dimensions in Android, let's say dev and prod
2. Create build configurations in Xcode, which must be similar to Android's flavour dimensions.
3. Expose the current Xcode configuration via user-defined settings. The Xcode sets each of the user-defined settings as an env variable.
4. In the common module, you can get the current variant via checking the android's current build task or if that is not present (when you are building for ios) you can get that via the env variable