Merge Aether tools
This commit is contained in:
46
tools/helpers/AntHelper.hx
Normal file
46
tools/helpers/AntHelper.hx
Normal file
@@ -0,0 +1,46 @@
|
||||
package helpers;
|
||||
|
||||
|
||||
class AntHelper {
|
||||
|
||||
|
||||
private static var ant:String;
|
||||
|
||||
|
||||
public static function initialize (defines:Hash <String>):Void {
|
||||
|
||||
if (defines.exists ("ANDROID_SDK")) {
|
||||
|
||||
Sys.putEnv ("ANDROID_SDK", defines.get ("ANDROID_SDK"));
|
||||
|
||||
}
|
||||
|
||||
ant = defines.get ("ANT_HOME");
|
||||
|
||||
if (ant == null || ant == "") {
|
||||
|
||||
ant = "ant";
|
||||
|
||||
} else {
|
||||
|
||||
ant += "/bin/ant";
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static function run (workingDirectory:String, commands:Array <String>):Void {
|
||||
|
||||
if (commands == null) {
|
||||
|
||||
commands = [];
|
||||
|
||||
}
|
||||
|
||||
ProcessHelper.runCommand (workingDirectory, ant, commands);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user