Strumenta / antlr-kotlin

Support for Kotlin as a target for ANTLR 4
Apache License 2.0
222 stars 47 forks source link

Revise Gradle Plugin to make it simpler to use #116

Open ftomassetti opened 9 months ago

ftomassetti commented 9 months ago

It should require minimal or no configuration out-of-the-box, while making possible to disable magic that could break

ftomassetti commented 9 months ago

For example,

lppedd commented 9 months ago

You can assign this one to me in case.

I'll take a look in a couple weeks.

frett commented 8 months ago

I have a rough plugin implementation over here that could be used as a basis for this issue: https://github.com/CruGlobal/kotlin-mpp-godtools-tool-parser/blob/antlrUpdate/build-logic/src/main/kotlin/org/cru/godtools/shared/gradle/KotlinAntlrPlugin.kt

There is an issue with android lint tasks for a few test sourcesets depending on the antlr task output for some reason in my project. It might just be that the generated source needs to be attached to the source set differently 🤷 but I'm not sure and don't have the time currently to debug this or figure out a better solution. I worked around the issue for now by defining which sourcesets to apply the plugin to via the extension.

The other task settings should probably also be exposed via the extension so they can be configured when the plugin is applied