question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remove antlr4 Dependency?

See original GitHub issue

Right now, com.graphql-java:graphql-java:2.1.0 has a dependency on org.antlr:antlr4:4.5.1 in its POM. AFAIK, org.antlr:antlr4:4.5.1 represents the JAR with the tools that you would use to generate your parser/lexer from the grammar. While you might need that to build com.graphql-java:graphql-java, you should not need that to use com.graphql-java:graphql-java. The org.antlr:antlr4-runtime:4.5.1 artifact contains the runtime code that gets used by the code-generated parser/lexer.

As it stands, attempting to build an Android app that uses com.graphql-java:graphql-java results in a build error, due to multiple libraries defining the same Java class. However, if I do this:

    compile('com.graphql-java:graphql-java:2.1.0') {
        exclude module: 'antlr4'
    }

then everything is fine.

Are you really sure that your POM is supposed to list a dependency for org.antlr:antlr4:4.5.1?

Thanks!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:4
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
foragerrcommented, Oct 27, 2016

@IamCornholio You found and tied together an SO question, a gradle forum post and a github issue; I bow to your google fu!

You should post your pom customization snippet as an answer on SO.

0reactions
dminkovskycommented, Oct 27, 2016

Oh, and for posterity: to build the to-be-published POM locally without publishing:

./gradlew generatePomFileForGraphqlJavaPublication`

This build the POM in:

build/publications/graphqlJava/pom-default.xml
Read more comments on GitHub >

github_iconTop Results From Across the Web

Can I remove ANTLR dependencies from generated code?
It really isn't practical to remove runtime dependencies on ANTLR. You need to distribute the ANTLR runtime library with your recognizers.
Read more >
How to uninstall or remove antlr4 software package from ...
Use Purging antlr4. If you use with purge options to antlr4 package all the configuration and dependent packages will be removed. $ sudo...
Read more >
Download ANTLR
To get Swift ANTLR runtime, clone the ANTLR repository. Open it in finder. From the root directory of the repo, go to runtime/Swift...
Read more >
How to install antlr4 On Ubuntu 16.04 Lts? Uninstall and ...
This will remove antlr4 and all its dependent packages which is no longer needed in the system. Completely removing antlr4 with all configuration...
Read more >
antlr4 - npm
JavaScript runtime for ANTLR4. ... Start using antlr4 in your project by running `npm i antlr4`. ... Dev Dependencies (10).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found