Skip to content

Commit

Permalink
Create a mockito upgrade recipe that just does 4 -> 5, so it can be i…
Browse files Browse the repository at this point in the history
…ncluded in Spring 3.1 upgrade.

Both "Migrate to Spring Boot 2.4" and "Mockito 5.x upgrade" include "Mockito 4.x upgrade"
So if we add "Mockito 5.x upgrade" into "Migrate to Spring Boot 3.1" then "Mockito 4.x upgrade", and all its constituent recipes, will be run twice. The performance cost of this is not dire, but the spring boot migration is already a very large recipe with ~2k steps.
  • Loading branch information
sambsnyd committed Nov 12, 2024
1 parent 9a5b444 commit ef62c31
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/main/resources/META-INF/rewrite/mockito.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,17 @@ type: specs.openrewrite.org/v1beta/recipe
name: org.openrewrite.java.testing.mockito.Mockito1to5Migration
displayName: Mockito 5.x upgrade
description: Upgrade Mockito from 1.x to 5.x.
tags:
- testing
- mockito
recipeList:
- org.openrewrite.java.testing.mockito.Mockito1to4Migration
- org.openrewrite.java.testing.mockito.Mockito4to5Only
---
type: specs.openrewrite.org/v1beta/recipe
name: org.openrewrite.java.testing.mockito.Mockito4to5Only
displayName: Mockito 4 to 5.x upgrade only
description: Upgrade Mockito from 4.x to 5.x. Does not include 1.x to 4.x migration.
tags:
- testing
- mockito
Expand All @@ -49,7 +60,6 @@ recipeList:
artifactId: byte-buddy*
newVersion: 1.15.x
- org.openrewrite.maven.RemoveDuplicateDependencies

---
type: specs.openrewrite.org/v1beta/recipe
name: org.openrewrite.java.testing.mockito.Mockito1to4Migration
Expand Down

0 comments on commit ef62c31

Please sign in to comment.