From ca78f0c0a43464a945b542c14b921fc2f6b6b6f1 Mon Sep 17 00:00:00 2001 From: Shannon Pamperl Date: Thu, 5 Sep 2024 13:22:13 -0500 Subject: [PATCH] Remove deprecated methods now that a new version of the tooling api is published --- .../org/openrewrite/gradle/DependencyVersionSelector.java | 4 ++-- .../java/org/openrewrite/gradle/plugins/ChangePlugin.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rewrite-gradle/src/main/java/org/openrewrite/gradle/DependencyVersionSelector.java b/rewrite-gradle/src/main/java/org/openrewrite/gradle/DependencyVersionSelector.java index 90a6019344d..e2c549521d2 100644 --- a/rewrite-gradle/src/main/java/org/openrewrite/gradle/DependencyVersionSelector.java +++ b/rewrite-gradle/src/main/java/org/openrewrite/gradle/DependencyVersionSelector.java @@ -167,11 +167,11 @@ private MavenMetadata downloadMetadata(String groupId, String artifactId, List determineRepos(@Nullable String configuration) { if (gradleSettings != null) { - return gradleSettings.getPluginRepositories(); + return gradleSettings.getBuildscript().getMavenRepositories(); } Objects.requireNonNull(gradleProject); return "classpath".equals(configuration) ? - gradleProject.getMavenPluginRepositories() : + gradleProject.getBuildscript().getMavenRepositories() : gradleProject.getMavenRepositories(); } } diff --git a/rewrite-gradle/src/main/java/org/openrewrite/gradle/plugins/ChangePlugin.java b/rewrite-gradle/src/main/java/org/openrewrite/gradle/plugins/ChangePlugin.java index 4bc90b42be2..252ac358736 100644 --- a/rewrite-gradle/src/main/java/org/openrewrite/gradle/plugins/ChangePlugin.java +++ b/rewrite-gradle/src/main/java/org/openrewrite/gradle/plugins/ChangePlugin.java @@ -247,9 +247,9 @@ private J.MethodInvocation maybeUpdateApplySyntax(J.MethodInvocation m) { private List getPluginRepositories() { if (gradleProject != null) { - return gradleProject.getMavenPluginRepositories(); + return gradleProject.getBuildscript().getMavenRepositories(); } - return gradleSettings.getPluginRepositories(); + return gradleSettings.getBuildscript().getMavenRepositories(); } } );