use of org.gradle.process.ExecSpec in project atlas by alibaba.
the class ZipAlignUtils method doZipAlign.
public static synchronized File doZipAlign(final AndroidBuilder androidBuilder, Project project, final File apkFile) {
final File zipalignedFile = new File(apkFile.getParent(), apkFile.getName().replace(".apk", "-zipaligned.apk"));
project.exec(new Action<ExecSpec>() {
@Override
public void execute(ExecSpec execSpec) {
String path = androidBuilder.getTargetInfo().getBuildTools().getPath(ZIP_ALIGN);
execSpec.executable(new File(path));
execSpec.args("-f", "4");
execSpec.args(apkFile);
execSpec.args(zipalignedFile);
}
});
return zipalignedFile;
}
use of org.gradle.process.ExecSpec in project atlas by alibaba.
the class BuildHelper method doZipAlign.
public static synchronized File doZipAlign(final AndroidBuilder androidBuilder, Project project, final File apkFile) {
final File zipalignedFile = new File(apkFile.getParent(), apkFile.getName().replace(".apk", "-zipaligned.apk"));
project.exec(new Action<ExecSpec>() {
@Override
public void execute(ExecSpec execSpec) {
String path = androidBuilder.getTargetInfo().getBuildTools().getPath(ZIP_ALIGN);
execSpec.executable(new File(path));
execSpec.args("-f", "4");
execSpec.args(apkFile);
execSpec.args(zipalignedFile);
}
});
return zipalignedFile;
}
Aggregations