Eric, any thoughts?
Here is what the User Guide has to say:
Production ANTLR grammar files. If the ANTLR grammar is organized in packages, the structure in the antlr folder should reflect the package structure. This ensures that the generated sources end up in the correct target subfolder.
But that is what I have. Yet this set up fails using Antlr 4.5 + any Gradle version newer than 2.4. The underlying problem, as far as I can tell, is that for some reason the lexical token file is created in the source dir and then Antlr tries to find it in the builddir:
error(160): org/hibernate/sqm/parser/hql/internal/antlr/HqlParser.g4:4:12: cannot find tokens file /home/sebersole/projects/hibernate/hibernate-semantic-query/build/generated-src/antlr/main/HqlLexer.tokens
HqlLexer.tokens actually is generated and does exist, but it was generated as /home/sebersole/projects/hibernate/hibernate-semantic-query/src/main/antlr/org/hibernate/sqm/parser/hql/internal/antlr/HqlLexer.tokens (src/main versus build/generated-src/antlr/main/). Also notice that the package dir structure is missing in terms of where Antlr is looking for it