javacc / javaccPlugin

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

setting up different output directories #25

Closed jomifred closed 8 years ago

jomifred commented 8 years ago

Hi, thanks for the plugin!

In my project I have two grammars and the produced classes should be placed in different directories (since they are in different java packages).

Is it possible to not override the OUTPUT_DIRECTORY option defined in the javacc file? (or provide different output directories in the gradle build).

thanks a lot.

Jomi

johnmartel commented 8 years ago

Hi Jomi,

can you provide a link to the code that you mention? If you look at the acceptance-tests subproject, there are many examples where a project has more than one grammar and where the generated classes are under different packages. If you define the package correctly in your grammar file, that should not be a problem.


Jonathan Martel Informaticien conseiller en Génie Logiciel Consultants CoGL inc. 581.986.7030 jonathan.martel@coglinc.ca Twitter: @johnmartelqc LinkedIn: http://www.linkedin.com/pub/jonathan-martel/24/312/711

Signature digitale: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x321163AE83A4068A

On May 17, 2016, at 14:04, Jomi F. Hubner notifications@github.com wrote:

Hi, thanks for the plugin!

In my project I have two grammars and the produced classes should be placed in different directories (since they are in different java packages).

Is it possible to not override the OUTPUT_DIRECTORY option defined in the javacc file? (or provide different output directories in the gradle build).

thanks a lot.

Jomi

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/johnmartel/javaccPlugin/issues/25

jomifred commented 8 years ago

Thanks for the prompt answer and for pointing to the tests.

Indeed it is so simple to solve, I just needed to replicate the directory structure of packages under src/main/javacc.

thanks for the help.

Jomi (from Jason language -- http://jason.sf.net -- migrating to gradle and github now)

johnmartel commented 8 years ago

Closing this as my answer and the examples in acceptance-tests should provide enough context for you to solve your problem.