antlr5
antlr5 copied to clipboard
Generate UnicodeData using Gradle
ANTLR tool maven build relies on com.webguys:string-template-maven-plugin:1.1 plugin to generate org/antlr/v5/unicode/UnicodeData.java
.
When switching to Gradle, we could not find an equivalent Gradle plugin so we temporarily opted for a tactical solution i.e. use the UnicodeData.java
file generated by a previous maven build.
This is acceptable as a tactical solution because the underlying data (emanating from com.ibm.icu.text.UnicodeSet
) rarely changes.
But on the long term we need a solution that generates the file dynamically.
Options that come to mind:
- create a Gradle plugin for string-template
- use MavenExecutor, wrapping the existing maven plugin
- use an alternative templating engine for which a Gradle plugin already exists
- move the code to a custom Gradle task
- ...
I would be happy to help with this @ericvergnaud.
What would the best approach be? Should I open a PR against your fork to be merged into https://github.com/ericvergnaud/antlr5/tree/build-using-gradle?