@NonNull
public ZipAlign createZipAlignTask(
@NonNull String taskName,
@NonNull File inputFile,
@NonNull File outputFile) {
ApkVariantData variantData = getApkVariantData();
//noinspection VariableNotUsedInsideIf
if (variantData.zipAlignTask != null) {
throw new RuntimeException(String.format(
"ZipAlign task for variant '%s' already exists.", getName()));
}
ZipAlign task = plugin.createZipAlignTask(taskName, inputFile, outputFile);
// update variant data
variantData.setOutputFile(outputFile);
variantData.zipAlignTask = task;
// setup dependencies
variantData.assembleTask.dependsOn(task);