javacc / javaccPlugin

A JavaCC plugin for Gradle
MIT License
33 stars 16 forks source link

Do not add javacc output to all source sets #57

Closed kelemen closed 1 year ago

kelemen commented 2 years ago

The JavaToJavaccDependencyAction class adds the generated javacc output to all source roots. This is undesirable for me, if I have multiple source roots, because now I will have the class files (compiled from javacc output) everywhere which creates duplicates when packaging them together into the same jar.

Also, doing this in the afterEvaluate is fragile since configurations might happen afterwards (i.e., the plugin should rely on the Provider API of Gradle even if it does this).

Anyway, this automatic addition of source roots should be optional, or the very least, it should be possible to opt-out.

zbynek commented 1 year ago

Duplicate of #22 which has a proposed fix in #23