antlr-kotlin icon indicating copy to clipboard operation
antlr-kotlin copied to clipboard

Revise Gradle Plugin to make it simpler to use

Open ftomassetti opened this issue 1 year ago • 3 comments
trafficstars

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

ftomassetti avatar Dec 15 '23 10:12 ftomassetti

For example,

  • [ ] task generateKotlinGrammarSource should be created
  • [ ] dependencies on generateKotlinGrammarSource should be set for other tasks.
  • [ ] source sets should be configured
  • [ ] Also, the README should be updated to reflect that.

ftomassetti avatar Dec 15 '23 10:12 ftomassetti

You can assign this one to me in case.

I'll take a look in a couple weeks.

lppedd avatar Dec 15 '23 11:12 lppedd

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

frett avatar Jan 10 '24 16:01 frett