In summary added compatibility with flyway 10 and 9 by using reflection when initializing flyway scanner. Add mechanism to check the dependency based on the mentioned flyway versions.
Comment From: MazizEsa
Hi @wilkinsona Can you have a look. This is a draft (for https://github.com/spring-projects/spring-boot/issues/38923), WIP. Im wanna check first whether it's in the right direction. Still need to add checks / conditions on dependency part to cater the different dependencies and package structure when importing (postgres and hsql) and some cleanup.
Thanks in advance.
Comment From: wilkinsona
Thanks, @MazizEsa. For the default case (Flyway 9), please don't use reflection. Instead, just directly call the Flyway API that we compile against. Only when Flyway 10's detected should reflection be used.
Also, if you can, please build your changes (./gradlew build or ./gradlew spring-boot-project:spring-boot-autoconfigure:build) and fix any problems before pushing.
Comment From: MazizEsa
Sure. I'm working from the main branch. Hence flyway 10 is the default. Is it fine? Or should I work from other branch?
On Mon, 13 May 2024, 7:19 pm Andy Wilkinson, @.***> wrote:
Thanks, @MazizEsa https://github.com/MazizEsa. For the default case (Flyway 9), please don't use reflection. Instead, just directly call the Flyway API that we compile against. Only when Flyway 10's detected should reflection be used.
Also, if you can, please build your changes (./gradlew build or ./gradlew spring-boot-project:spring-boot-autoconfigure:build) and fix any problems before pushing.
— Reply to this email directly, view it on GitHub https://github.com/spring-projects/spring-boot/pull/40698#issuecomment-2107311264, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAO5L76MH434LWB3VRTZETTZCCOVXAVCNFSM6AAAAABHS2KLLSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBXGMYTCMRWGQ . You are receiving this because you were mentioned.Message ID: @.***>
Comment From: wilkinsona
As I said a couple of weeks ago, the change is only needed in the 3.2.x branch. As you've noticed, we've already upgraded to Flyway 10 in the main branch so nothing's needed there. Please use 3.2.x as the base branch for your changes.
Comment From: MazizEsa
Thanks @wilkinsona . My bad. I was told either branch was fine before. Will make the changes soon.