Signed APK using gradle task for multiple flavors

can anyone tell me how generate signed APK using gradle task … i mean there are 2 flavors e.g flavor foo and bar … i need to write a task that will generate signed APK’s for both the flavours when i run it

There’s no special task you need to write to do this. You simply have to define a signing configuration. Once you’ve done so, running the appropriate ‘assemble’ task will additionally sign the APK.

yup… thanks …!! all that i needed to do was signingConfig for my flavours and hit assembleRelease build task from Android Studio.