I would like to have 2 different build.gradle file for creating APKs.
How can i achieve this?
What will be command i have to use to create APKs for specific build.gradle file ?
Theoretically you could have in the settings script code that sets the intended build script for project app, but this is seldomly a good idea.
You should better write the build in a way that does not need separate build scripts, but for example do conditional logic depending on some project property or similar that you can then set through -P.