Update Smali, Dx, and DexMerger tasks to use Gradle workers
This allows these tasks to run in parallel rather than in serial, leading to improved build times.
Before:
BUILD SUCCESSFUL in 1m 3s
317 actionable tasks: 192 executed, 125 up-to-date
After:
BUILD SUCCESSFUL in 25s
317 actionable tasks: 192 executed, 125 up-to-date
Change-Id: I9089a9b80cb1f0a570fc3135afbbbc6311fd4a2c
diff --git a/buildSrc/src/main/java/utils/Utils.java b/buildSrc/src/main/java/utils/Utils.java
index 7158e80..7843edd 100644
--- a/buildSrc/src/main/java/utils/Utils.java
+++ b/buildSrc/src/main/java/utils/Utils.java
@@ -17,8 +17,13 @@
}
}
+ public static File dxExecutable() {
+ String dxExecutableName = Utils.toolsDir().equals("windows") ? "dx.bat" : "dx";
+ return new File("tools/" + Utils.toolsDir() + "/dx/bin/" + dxExecutableName);
+ }
+
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
+}