gradle-gaelyk-plugin
gradle-gaelyk-plugin copied to clipboard
Handle Java keywords in folder names gracefully
Hi,
Whilst assembling my app I encountered a strange exception (stacktrace below) whilst running the gaelykPrecompileTemplate task. It appears to stem from a template folder being named "static". It can be recreated easily in the gaelyk template project by moving the index.gtpl into a sub-folder called static and running "gradlew assemble".
Also, and possibly related, it appears that packages starting with numbers throw the same exception, i.e. changing the template folder to 123 throws the same exception as above.
Cheers, Gary
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':gaelykPrecompileTemplate'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:68)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
... snip ...
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:47)
Caused by: : Compilation Failed
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
... snip ...
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:60)
... 57 more
Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
C:\Tools\Cygwin\tmp\gtpl-staging--786316078\WEB-INF\pages\static\$gtpl$index.groovy: 1: expecting an identifier, found 'static' @ line 1, column 23.
package web_inf.pages.static;out.print(""""""); include '/WEB-INF/includes/header.gtpl' ;
^
1 error
... 74 more