spring-projects-experimental / spring-boot-migrator

Spring Boot Migrator (SBM) is a tool for automated code migrations to upgrade or migrate to Spring Boot
Apache License 2.0
439 stars 88 forks source link

Spike: Parse a project with Gradle build file #216

Closed fabapp2 closed 2 years ago

fabapp2 commented 2 years ago

Try to parse a project that uses Gradle instead of Maven to learn about problems and answer questions like:

It makes sense to look into Gradle support before implementing multi module projects only in Maven to learn about implications early on.

fabapp2 commented 2 years ago

With OpenRewrite 7.26.0 the support for Gradle is not as complete as for Maven. Gradle files are parsed as Groovy G.CompilationUnits and the operations for Gradle, like adding plugins or getting dependencies, must be implemented as Recipes/Visitors for these Groovy files. To support the same API for Gradle as for Maven many Recipes/Visitors are missing and obviously the API would need to diverge or work on the lowest common denominator where possible, e.g. with scopes for dependencies.

Not now...