ANTLR runtime JAR dependency via gradle

已查看 21 次
跳至第一个未读帖子

d.philip....@gmail.com

未读,
2018年3月13日 11:57:442018/3/13
收件人 antlr-di...@googlegroups.com
Would somebody be so kind as to tell me if there is a right way of including the ANTLR runtime JAR (not the tool) with my code when I am building using Gradle with the ANTLR plugin?

Essentially, everything is done automatically through Gradle in terms of generating my Java sources from my grammars. However, I can't actually execute them because the ANTLR runtime package is needed by the generated code, so it has to be on the class path. Unfortunately, the runtime JAR is nowhere to be seen, so it cannot be appended to the classpath. So, the question is, if the ANTLR plugin for Gradle is capable of automating the generation phase, can it supply me with the runtime JAR too?

I know I can just download the JAR myself and include it in my libs, but can't the ANTLR plugin automate this so that a prescribed version is downloaded according to my build script?

I am at a loss as to why I can't see the corresponding runtime JAR when the tool invoked by the ANTLR plugin was successfully deployed.

Am I expecting something of the ANTLR plugin that it doesn't do?

David

P.S. I've attached a basic ANTLR project, and if you execute gradle build you will see that everything works properly, that is, the parser is created. However, there is no sign of any runtime.
A.zip
回复全部
回复作者
转发
0 个新帖子