return task;
}
private Task addRunLauch4jTask(Project project, Launch4jPluginExtension configuration)
{
final Exec task = makeTask(TASK_RUN_NAME, Exec.class);
task.setDescription("Runs launch4j to generate an .exe file");
task.setGroup(LAUNCH4J_GROUP);
// TODO
project.afterEvaluate(new Action<Project>() {
@Override
public void execute(Project project)
{
Launch4jPluginExtension ext = ((Launch4jPluginExtension) task.getProject().getExtensions().getByName(Launch4jPlugin.LAUNCH4J_CONFIGURATION_NAME));
task.setCommandLine(ext.getLaunch4jCmd(), project.getBuildDir() + "/" + ext.getOutputDir() + "/" + ext.getXmlFileName());
task.setWorkingDir(project.file(ext.getChdir()));
}
});
return task;
}