Skip to content

Commit

Permalink
Update zipalign to 28.0.3 win/linux binary and improve debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickfav committed Oct 23, 2018
1 parent 36902d4 commit 6d2a34f
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
## v1.0.0

* updates apksigner to v28.0.3
* update zipalign to 28.0.3 win/linux binary
* updates maven plugin versions
* use maven wrapper
* slightly improved debugging output

## v0.8.4
* add file size info to log output
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
</execution>
</executions>
<configuration>
<skip>false</skip> <!-- set this to true if fail because of missing credentials -->
<skip>true</skip> <!-- set this to true if fail because of missing credentials -->
<keystore>${project.basedir}/keystore.jks</keystore>
<alias>pfopensource</alias>
<storepass>${env.OPENSOURCE_PROJECTS_KS_PW}</storepass>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/at/favre/tools/apksigner/SignTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ private static File zipAlign(File targetApkFile, File rootTargetFile, File outFo
if (executor.isExecutableFound()) {
String logMsg = "\t- ";

CmdUtil.Result zipAlignResult = CmdUtil.runCmd(CmdUtil.concat(executor.getZipAlignExecutable(), new String[]{ZIPALIGN_ALIGNMENT, targetApkFile.getAbsolutePath(), outFile.getAbsolutePath()}));
CmdUtil.Result zipAlignResult = CmdUtil.runCmd(CmdUtil.concat(executor.getZipAlignExecutable(), new String[]{"-v", ZIPALIGN_ALIGNMENT, targetApkFile.getAbsolutePath(), outFile.getAbsolutePath()}));
cmdList.add(zipAlignResult);
if (zipAlignResult.success()) {
logMsg += "zipalign success";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ private void findLocation(Arg arg) {

String fileName, lib = null;
if (osType == CmdUtil.OS.WIN) {
fileName = "win-zipalign_25_0_0.exe";
fileName = "win-zipalign_28_0_3.exe";
} else if (osType == CmdUtil.OS.MAC) {
fileName = "mac-zipalign-24_0_3";
lib = "linux64-libc++-25_0_0.so"; //TODO test if this works on mac
lib = "linux64-libc++-28_0_3.so"; //TODO test if this works on mac
} else {
fileName = "linux-zipalign-25_0_0";
lib = "linux64-libc++-25_0_0.so";
fileName = "linux-zipalign-28_0_3";
lib = "linux64-libc++-28_0_3.so";
}

tmpFolder = Files.createTempDirectory("uapksigner-").toFile();
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/at/favre/tools/apksigner/util/CmdUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public Result(String out, Exception exception, String[] cmd, int exitValue) {

@Override
public String toString() {
return cmd + "\n" + out + "\n";
return cmd + "\n" + out + " (" + exitValue + ")\n";
}

public boolean success() {
Expand Down
Binary file removed src/main/resources/linux-zipalign-25_0_0
Binary file not shown.
Binary file added src/main/resources/linux-zipalign-28_0_3
Binary file not shown.
Binary file removed src/main/resources/linux64-libc++-25_0_0.so
Binary file not shown.
Binary file added src/main/resources/linux64-libc++-28_0_3.so
Binary file not shown.
Binary file removed src/main/resources/win-zipalign_25_0_0.exe
Binary file not shown.
Binary file added src/main/resources/win-zipalign_28_0_3.exe
Binary file not shown.

0 comments on commit 6d2a34f

Please sign in to comment.