Skip to content

Commit

Permalink
Use builder so any future changes will not break compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
sambsnyd committed Sep 17, 2024
1 parent b649d95 commit 10b08df
Showing 1 changed file with 9 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

import org.junit.jupiter.api.Test;
import org.openrewrite.DocumentExample;
import org.openrewrite.Tree;
import org.openrewrite.gradle.marker.GradlePluginDescriptor;
import org.openrewrite.gradle.marker.GradleProject;
import org.openrewrite.maven.tree.MavenRepository;
Expand Down Expand Up @@ -97,23 +96,19 @@ implementation platform("org.springframework.boot:spring-boot-starter-dependenci
}

private static GradleProject gradleProject(GradlePluginDescriptor... gradlePlugins) {
return new GradleProject(
Tree.randomId(),
"group",
"example",
"version",
":",
List.of(gradlePlugins),
Collections.emptyList(),
Collections.singletonList(MavenRepository.builder()
return GradleProject.builder()
.group("group")
.name("example")
.version("version")
.path(":")
.plugins(List.of(gradlePlugins))
.mavenRepositories(Collections.singletonList(MavenRepository.builder()
.id("Gradle Central Plugin Repository")
.uri("https://plugins.gradle.org/m2")
.releases(true)
.snapshots(true)
.build()),
Collections.emptyMap(),
null
);
.build()))
.build();
}

private static GradlePluginDescriptor springBootPlugin() {
Expand Down

0 comments on commit 10b08df

Please sign in to comment.