Builds a configuration script that applies the supplied transformations. @param transforms the transformation declarations @return the generated configuration script text
(List<String> transforms)
| 397 | * @return the generated configuration script text |
| 398 | */ |
| 399 | public static String buildConfigScriptText(List<String> transforms) { |
| 400 | StringBuilder script = new StringBuilder(); |
| 401 | script.append("withConfig(configuration) {").append("\n"); |
| 402 | |
| 403 | for (String t : transforms) { |
| 404 | script.append(t).append(";\n"); |
| 405 | } |
| 406 | |
| 407 | script.append("}"); |
| 408 | |
| 409 | return script.toString(); |
| 410 | } |
| 411 | |
| 412 | private static GroovyShell createConfigScriptsShell(CompilerConfiguration conf) { |
| 413 | Binding binding = new Binding(); |
no test coverage detected