Skip to content

Commit

Permalink
org.openrewrite.gradle.Assertions#withToolingModel moved to `org.op…
Browse files Browse the repository at this point in the history
…enrewrite.gradle.toolingapi.Assertions` (#494)

* `org.openrewrite.gradle.Assertions#withToolingModel` moved to `org.openrewrite.gradle.toolingapi.Assertions`

Use this link to re-run the recipe: https://app.moderne.io/recipes/org.openrewrite.java.ChangeMethodTargetToStatic?organizationId=T3BlblJld3JpdGU%3D

Co-authored-by: Moderne <[email protected]>

* Add org.openrewrite.gradle.tooling:model

* Fix unrelated FindDependency reference

---------

Co-authored-by: Moderne <[email protected]>
Co-authored-by: Knut Wannheden <[email protected]>
  • Loading branch information
3 people authored Feb 20, 2024
1 parent 9deb572 commit f27e198
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ dependencies {

testImplementation("com.github.marschall:memoryfilesystem:latest.release")

testImplementation("org.openrewrite.gradle.tooling:model:$rewriteVersion")

// for generating properties migration configurations
testImplementation("io.github.classgraph:classgraph:latest.release")
testImplementation("org.openrewrite:rewrite-java-17")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public Set<String> getTags() {

@Override
public TreeVisitor<?, ExecutionContext> getVisitor() {
return Preconditions.check(new FindDependency("org.springframework.boot", "spring-boot-starter-jetty"), new MavenVisitor<ExecutionContext>() {
return Preconditions.check(new FindDependency("org.springframework.boot", "spring-boot-starter-jetty", null, null), new MavenVisitor<ExecutionContext>() {
@Override
public @Nullable Xml visit(@Nullable Tree tree, ExecutionContext ctx) {
if (tree == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

import static org.assertj.core.api.Assertions.assertThat;
import static org.openrewrite.gradle.Assertions.buildGradle;
import static org.openrewrite.gradle.Assertions.withToolingApi;
import static org.openrewrite.gradle.toolingapi.Assertions.withToolingApi;
import static org.openrewrite.maven.Assertions.pomXml;

@Issue("https://github.com/openrewrite/rewrite-spring/issues/274")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

import static org.assertj.core.api.Assertions.assertThat;
import static org.openrewrite.gradle.Assertions.buildGradle;
import static org.openrewrite.gradle.Assertions.withToolingApi;
import static org.openrewrite.gradle.toolingapi.Assertions.withToolingApi;
import static org.openrewrite.properties.Assertions.properties;
import static org.openrewrite.test.SourceSpecs.other;
import static org.openrewrite.test.SourceSpecs.text;
Expand Down

0 comments on commit f27e198

Please sign in to comment.