You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
plugins {
id 'java'
id 'com.google.cloud.tools.linkagechecker' version "1.5.9"
}
group 'org.example'
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
dependencies {
compile 'com.google.cloud:google-cloud-core:1.95.4'
compile 'com.google.cloud:google-cloud-core:1.95.4:tests'
}
test {
useJUnitPlatform()
}
linkageChecker {
configurations = ['compile']
}
Running the command below fails:
./gradlew linkageCheck --stacktrace
...
* What went wrong:
Execution failed for task ':linkageCheck'.
> com.google.cloud:google-cloud-core:1.95.4 is not in the class path
...
Caused by: java.lang.IllegalArgumentException: com.google.cloud:google-cloud-core:1.95.4 is not in the class path
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:219)
at com.google.cloud.tools.opensource.classpath.ClassPathResult.formatDependencyPaths(ClassPathResult.java:68)
at com.google.cloud.tools.opensource.classpath.LinkageProblem.dependencyPathsOfProblematicJars(LinkageProblem.java:248)
at com.google.cloud.tools.opensource.classpath.LinkageProblem.formatLinkageProblems(LinkageProblem.java:228)
at com.google.cloud.tools.dependencies.gradle.LinkageCheckTask.findLinkageErrors(LinkageCheckTask.java:159)
at com.google.cloud.tools.dependencies.gradle.LinkageCheckTask.run(LinkageCheckTask.java:98)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:104)
The text was updated successfully, but these errors were encountered:
The plugin's createClassPathResult is returning a result with missing the test-classifier artifact.
Gradle's ResolvedConfiguration holds the test-classifier artifacts correctly.
The looking up the artifact is failing because the key (ClassPathEntry) needs to match artifact field and the Artifact class (implementation DefaultArtifact) requires to match the file. Test-classifier artifact has different file than the normal artifact.
That's why the error says "com.google.cloud:google-cloud-core:1.95.4 is not in the class path".
Linkage Checker to work with artifacts with classifiers
#2162 (comment)
Given build.gradle:
Running the command below fails:
The text was updated successfully, but these errors were encountered: