Skip to content

gradle.FindDependency also finds Gradle Dependency Constraints #5599

@MBoegers

Description

@MBoegers

What version of OpenRewrite are you using?

I am using current main.

How are you running OpenRewrite?

Via the unit tests, https://github.com/openrewrite/rewrite/blob/main/rewrite-gradle/src/test/java/org/openrewrite/gradle/search/FindDependencyTest.java

What is the smallest, simplest way to reproduce the problem?

With FindDependency to me configured to find com.fasterxml.jackson.core:jackson-databind

plugins { id 'java' }
repositories { mavenCentral() }

dependencies {
    constraints {
        implementation('com.fasterxml.jackson.core:jackson-databind:2.12.7.1')
    }
}

What did you expect to see?

No Search Result Marker

What did you see instead?

plugins { id 'java' }
repositories { mavenCentral() }

dependencies {
    constraints {
        /*~~>*/implementation('com.fasterxml.jackson.core:jackson-databind:2.12.7.1')
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions