Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate the build to Gradle #43

Open
ericvergnaud opened this issue Feb 27, 2024 · 4 comments
Open

Migrate the build to Gradle #43

ericvergnaud opened this issue Feb 27, 2024 · 4 comments
Assignees

Comments

@ericvergnaud
Copy link
Contributor

ericvergnaud commented Feb 27, 2024

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.

@ericvergnaud
Copy link
Contributor Author

@KvanTTT @lppedd this is the next task, one of you wanna do it or should I give it a go ?

@lppedd
Copy link
Collaborator

lppedd commented Mar 8, 2024

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.

@ericvergnaud
Copy link
Contributor Author

@lppedd any progress ? Just let me know if you're too busy and I'll give it a try.

@ericvergnaud
Copy link
Contributor Author

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:

  1. generates various parsers using antlr3 maven plugin
  2. transforms the generated code to antlr4 using com.google.code.maven-replacer-plugin/replacer
  3. 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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants