void (JpsModel model) { Map<String, Object> variables = new HashMap<>(); variables.put("project", model.getProject()); variables.put("global", model.getGlobal()); try { new GroovyShell(new Binding(variables)).evaluate(myScriptFile); } catch (IOException e) { throw new RuntimeException(e); } }