What should be the direction to reach local gradle...
# community-support
g
What should be the direction to reach local gradle build (only for dev purpose and not for publishing) from a medium sized multimodule maven project having parent pom, some standard and some custom plugins, properties and tons of dependencies? What I've tried? Run gradle init on root directory and manually putting 100s of dependencies like
implementation '<sample-dependency>'
in a child module by getting all dependencies from dependency management of root pom.xml. Is there an easy fast way to achieve the end result here? P.S. Other teams dont want to move to gradle and parent pom will also remain in maven, hence want to navigate this situation for my team to get incremental compilation support to a big child module where changing small things leads to recompiling of 10k+ classes. 🙏
b
If I understand correctly the parent POM serves as a bill of materials. If you want to import these dependency constraints into a Gradle build you should look at https://docs.gradle.org/current/userguide/platforms.html I also blogged about different ways of declaring dependencies a while ago: https://britter.dev/blog/2025/01/24/version-catalogs-vs-platforms/ So your process would be: create the gradle build file, put all dependencies from the module's POM.xml into the build file. Define a platform dependency on the parent. Look into how to replace maven plugins with Gradle plugins.
g
mostly right but there is 1 root pom and 5 child poms, and room pom has an org wide parent pom dependency like
Copy code
<parent>
    <artifactId>pp-parent-pom</artifactId>
    <groupId><http://com.org|com.org></groupId>
    <version>0.116</version>
</parent>
2. <dependencyManagement> and <dependencies> and plugins block
Did a gradle init in root pom but it did not gather all dependencies/plugins but just child modules