Add dexmerger support for Windows
This CL adds a dexmerger.bat script that uses the
already present dx.jar file in order to be able to
build tests that rely on this tool, namely the smali
tests.
Bug:
Change-Id: I4b69f6b60c7fc7e042b82c36657e5fcf22a0239a
diff --git a/buildSrc/src/main/java/utils/Utils.java b/buildSrc/src/main/java/utils/Utils.java
index 4cbc90c..7158e80 100644
--- a/buildSrc/src/main/java/utils/Utils.java
+++ b/buildSrc/src/main/java/utils/Utils.java
@@ -3,6 +3,8 @@
// BSD-style license that can be found in the LICENSE file.
package utils;
+import java.io.File;
+
public class Utils {
public static String toolsDir() {
String osName = System.getProperty("os.name");
@@ -14,4 +16,9 @@
return "linux";
}
}
-}
+
+ public static File dexMergerExecutable() {
+ String executableName = Utils.toolsDir().equals("windows") ? "dexmerger.bat" : "dexmerger";
+ return new File("tools/" + Utils.toolsDir() + "/dx/bin/" + executableName);
+ }
+}
\ No newline at end of file