task.setOutputproperty(outputProperty);
Argument versionArgument = task.createArg();
versionArgument.setValue("--version");
task.execute();
//Parse version number and return as int
String output = project.getProperty(outputProperty);
int prefixIndex = output.indexOf("Version ");
int version = Integer.parseInt(output.substring(prefixIndex + 8, prefixIndex + 9));