Gradle ships with a plugin for Antlr support. They made the decision to try to support all versions (2, 3 and 4) of Antlr in a single plugin however, which leads to a few problems. Additionally, Antlr's Tool itself causes numerous problems trying to integrate it into build tool (I've helped write both the Maven and Gradle support for Antlr).
I have asked the Gradle team about splitting up their single plugin into multiple version-specific ones, but they are not interested. They say (and I can't blame them) that the best solution is for the Gradle team to maintain such a version-specific plugin. There are a number of attempts to write a Antlr4-specific Gradle plugin, but they all suffer from various short-comings.
As I transition Hibernate to use Antlr 4 this lack of decent build support causes us trouble. I need to solve these problems so I can actually get our build working. I already have a working solution which required writing a custom plugin. My solution, however, misses some Antlr features that I will need shortly (token vocabs and import grammars) that I did not need initially.
So I need to make a decision regarding how generally applicable I make this solution, versus just hard-coding the specifics for our build (which is what I have today). Really this comes down to whether this is something the Antlr team would be interested in accepting and maintaining. If not, I'll just hack away for specifically what I need. But if you are willing to accept it and take on maintaining it, I have a few questions to really be able to move forward - around these Antlr Tool shortcomings, mainly relating to parsing the grammar files such as building a GrammarAST tree, getting access to certain info and getting the Tool to operate on the GrammarAST trees I just built.