Skip to content

Commit

Permalink
Add missing tools API to a gradle dependency test
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek committed Dec 10, 2024
1 parent c972f02 commit 0804dca
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.openrewrite.test.RecipeSpec;

import static org.openrewrite.gradle.Assertions.buildGradle;
import static org.openrewrite.gradle.toolingapi.Assertions.withToolingApi;
import static org.openrewrite.java.Assertions.mavenProject;
import static org.openrewrite.maven.Assertions.pomXml;

Expand All @@ -36,10 +37,14 @@ public void defaults(RecipeSpec spec) {
@Test
void updateGradleDependencies() {
rewriteRun(
spec -> spec.beforeRecipe(withToolingApi()),
mavenProject("project",
//language=groovy
buildGradle(
"""
plugins {
id "java-library"
}
dependencies {
implementation("io.micronaut:micronaut-session")
}
Expand All @@ -48,6 +53,9 @@ void updateGradleDependencies() {
}
""",
"""
plugins {
id "java-library"
}
dependencies {
implementation("io.micronaut.session:micronaut-session")
}
Expand Down

0 comments on commit 0804dca

Please sign in to comment.