Search code examples
gradlebuildmacos-big-surasciidoctor

Cannot locate a Guava Jar in the gradle distribution?


I have the following error while performing the gradle build command.

  • What went wrong:
Execution failed for task ':asciidoctor'.
> Cannot locate a Guava JAR in the Gradle distribution

I'm using macOS Big Sur.


Solution

  • I had the same issue on my system.

    It appears the problem was the use of the "3.2.0" version of "asciidoctor" plugins. The gradle version I'm currently using is "7.2".

    This is the plugins section that was causing the problem:

    plugins {
       id("org.asciidoctor.jvm.pdf") version "3.2.0"
       id("org.asciidoctor.jvm.gems") version "3.2.0"
       id("org.asciidoctor.jvm.convert") version "3.2.0"
    }
    

    The fix was just to update the versions of these plugins to the latest version, which is "3.3.2".