antlr5 icon indicating copy to clipboard operation
antlr5 copied to clipboard

Generate UnicodeData using Gradle

Open ericvergnaud opened this issue 11 months ago • 1 comments

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
  • ...

ericvergnaud avatar Mar 21 '24 15:03 ericvergnaud

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?

DavidGregory084 avatar Apr 16 '24 11:04 DavidGregory084