I have the following error while performing the gradle build
command.
Execution failed for task ':asciidoctor'.
> Cannot locate a Guava JAR in the Gradle distribution
I'm using macOS Big Sur.
The configuration has the attributes org.gradle.usage=java-runtime,org.gradle.libraryelements=jar,minified=true . The external guava dependency has two variants: org.gradle.usage=java-runtime,org.gradle.libraryelements=jar,minified=false and org.gradle.usage=java-api,org.gradle.libraryelements=jar,minified=false.
Before Gradle, we used to download the JAR file and put it in the libs folder. Now Gradle handles these things automatically for us. However, this process is still supported with Gradle for special purposes like custom JAR files. 3. Flat Directory
Flat Directory If we want to use a flat filesystem directory as our repository, we need to add the following to our build.gradle file: This makes Gradle look into lib1 and lib2 for dependencies. Once we set the flat directories, we can use our local JAR file from the lib1 or lib2 folder:
As soon as Gradle finishes resolving the artifacts for the variant, either by downloading an external dependency or executing a task producing the artifact, Gradle starts transforming the artifacts of the variant with the selected chain of artifact transforms. Gradle executes the transform chains in parallel when possible.
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".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With