antlr5
antlr5 copied to clipboard
Migrate the build to Gradle
Once #40 is merged, we will be aligned with our target architecture, which seems a good time to switch to Gradle so we can start generating WebAssembly using the Gradle plugin.
@KvanTTT @lppedd this is the next task, one of you wanna do it or should I give it a go ?
Hey! I can have a look at it next week, mid week. Been busy with work stuff.
I'll first check what's the required effort.
@lppedd any progress ? Just let me know if you're too busy and I'll give it a try.
I've started looking into this, see https://github.com/ericvergnaud/antlr5/tree/build-using-gradle. I'm able to build the Core, Java and Kotlin runtimes. The tool maven build is pretty complex. It:
- generates various parsers using antlr3 maven plugin
- transforms the generated code to antlr4 using com.google.code.maven-replacer-plugin/replacer
- generates a UnicodeData.java file from a string template using com.webguys/string-template-maven-plugin
Gradle has a built-in antlr task, which seems to handle 1) properly For 2) and 3), I couldn't locate gradle plugins. I tried using MavenExec plugin but couldn't get it to work... I don't think either of these deserve a plugin, it should be possible to achieve things using custom Gradle tasks. What do you think ?