Skip to content

Linkage Checker to work with artifacts with classifiers #2173

@suztomo

Description

@suztomo

Linkage Checker to work with artifacts with classifiers

#2162 (comment)

Given build.gradle:

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions