7

My build script is encountering an error (below). Is there a way to run Gradle with the same type of output as invoking Java with -verbose:class?

The error in question, should anyone have some input:

Caused by: org.gradle.api.artifacts.ResolveException: Could not resolve all dependencies for configuration ':Project:compile'.
    at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactDependencyResolver.wrapException(ErrorHandlingArtifactDependencyResolver.java:49)
    ... more
Caused by: java.lang.LinkageError: loader constraints violated when linking org/apache/ivy/core/module/descriptor/DependencyDescriptor class
tnunamak
  • 2,069
  • 3
  • 22
  • 34

2 Answers2

4

You can set the following environment variable, I believe...

GRADLE_OPTS="$GRADLE_OPTS -verbose:class"

and then invoke gradle. Read this link.

Once Gradle is downloaded and unzipped, the environment variable GRADLE_HOME can be set to the directory of the unzipped Gradle installation and the PATH should be set to $GRADLE_HOME/bin or %GRADLE_HOME%\bin. The Gradle installation page tells us that JVM options used by Gradle can be set via either GRADLE_OPTS or JAVA_OPTS. The Grade installation and configuration in the path can be confirmed by running gradle -v at the command line once the environment variable settings are sourced.

Amir Afghani
  • 37,814
  • 16
  • 84
  • 124
2

Please add to your build.gradle task: jvmArgs '-verbose:class'. For example to run gradle test, I use:

test{
    jvmArgs '-verbose:class'
}
aborskiy
  • 1,337
  • 2
  • 10
  • 12