Signed APK using gradle task for multiple flavors

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.