Adopt latest rewrite releases. Bump up boot-parent
This commit is contained in:
@@ -91,6 +91,11 @@
|
||||
<artifactId>rewrite-java-17</artifactId>
|
||||
<version>${rewrite-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jgit</groupId>
|
||||
<artifactId>org.eclipse.jgit</artifactId>
|
||||
<version>${jgit-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.xml.bind</groupId>
|
||||
<artifactId>jaxb-api</artifactId>
|
||||
|
||||
@@ -2,10 +2,10 @@ package org.springframework.ide.vscode.commons.rewrite;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
import org.openrewrite.shaded.jgit.diff.EditList;
|
||||
import org.openrewrite.shaded.jgit.diff.HistogramDiff;
|
||||
import org.openrewrite.shaded.jgit.diff.RawText;
|
||||
import org.openrewrite.shaded.jgit.diff.RawTextComparator;
|
||||
import org.eclipse.jgit.diff.EditList;
|
||||
import org.eclipse.jgit.diff.HistogramDiff;
|
||||
import org.eclipse.jgit.diff.RawText;
|
||||
import org.eclipse.jgit.diff.RawTextComparator;
|
||||
|
||||
class JGitUtils {
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@ import org.eclipse.lsp4j.VersionedTextDocumentIdentifier;
|
||||
import org.eclipse.lsp4j.WorkspaceEdit;
|
||||
import org.eclipse.lsp4j.jsonrpc.messages.Either;
|
||||
import org.openrewrite.Result;
|
||||
import org.openrewrite.shaded.jgit.diff.Edit;
|
||||
import org.openrewrite.shaded.jgit.diff.EditList;
|
||||
import org.eclipse.jgit.diff.Edit;
|
||||
import org.eclipse.jgit.diff.EditList;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.ide.vscode.commons.languageserver.completion.DocumentEdits;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>3.2.3</version>
|
||||
<version>3.2.5</version>
|
||||
<relativePath></relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -119,10 +119,11 @@
|
||||
<kotlin.version>1.9.20</kotlin.version>
|
||||
|
||||
<!-- Rewrite specific properties -->
|
||||
<rewrite-version>8.19.0</rewrite-version>
|
||||
<rewrite-kotlin-version>1.11.4</rewrite-kotlin-version>
|
||||
<rewrite-spring-version>5.5.0</rewrite-spring-version>
|
||||
<rewrite-gradle-tooling-api-version>2.0.0</rewrite-gradle-tooling-api-version>
|
||||
<rewrite-version>8.24.0</rewrite-version>
|
||||
<rewrite-kotlin-version>1.14.0</rewrite-kotlin-version>
|
||||
<rewrite-spring-version>5.8.0</rewrite-spring-version>
|
||||
<rewrite-gradle-tooling-api-version>2.2.0</rewrite-gradle-tooling-api-version>
|
||||
<jgit-version>6.9.0.202403050737-r</jgit-version>
|
||||
|
||||
<gradle-tooling.version>8.5</gradle-tooling.version>
|
||||
<gradle-core.version>6.1.1</gradle-core.version>
|
||||
|
||||
@@ -104,7 +104,7 @@ public class SpringBootUpgrade {
|
||||
if (version.getMajor() == targetVersion.getMajor() && version.getMinor() == targetVersion.getMinor()) {
|
||||
// patch version upgrade - treat as pom versions only upgrade
|
||||
recipe.getRecipeList().add(new UpgradeDependencyVersion("org.springframework.boot", "*", version.getMajor() + "." + version.getMinor() + ".x", null, null, null));
|
||||
recipe.getRecipeList().add(new UpgradeParentVersion("org.springframework.boot", "spring-boot-starter-parent", version.getMajor() + "." + version.getMinor() + ".x", null, null));
|
||||
recipe.getRecipeList().add(new UpgradeParentVersion("org.springframework.boot", "spring-boot-starter-parent", version.getMajor() + "." + version.getMinor() + ".x", null));
|
||||
} else /*if (version.getMajor() == targetVersion.getMajor())*/ {
|
||||
List<String> recipedIds = createRecipeIdsChain(version.getMajor(), version.getMinor() + 1, targetVersion.getMajor(), targetVersion.getMinor(), versionsToRecipeId);
|
||||
if (!recipedIds.isEmpty()) {
|
||||
|
||||
@@ -38,7 +38,7 @@ public class RewriteRecipeRepositoryTest {
|
||||
assertEquals(8, recipes.size());
|
||||
|
||||
recipes = recipeRepo.getSubRecipes("org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_1", List.of(0, 2)).get();
|
||||
assertEquals(14, recipes.size());
|
||||
assertEquals(20, recipes.size());
|
||||
|
||||
recipes = recipeRepo.getSubRecipes("org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_1",List.of(0, 345)).get();
|
||||
assertEquals(0, recipes.size());
|
||||
|
||||
Reference in New Issue
Block a user