Skip to content

Instantly share code, notes, and snippets.

View ducrohet's full-sized avatar

Xavier Ducrohet ducrohet

  • Google
  • Mountain View
View GitHub Profile
// need to create a signing task for all possible output
variant.outputs.each { output ->
// create a signing task for this
SignApk signTask = project.tasks.create("sign${output.name.capitalize()}MyApk", SignApk)
// setup task info
signTask.conventionMapping.inputFile = { output.packageApplication.outputFile }
signTask.outputFile = project.file("$project.buildDir/outputs/apk/${project.archivesBaseName}-${output.baseName}-unaligned.apk")
// other configuration of the signing task go here.