I'm working on two Java projects: Gradle project and a Maven project with snapshot dependency to the Gradle project.
When I'm changing the gradle project I need to install it to m2 and refresh the dependency in the IntelliJ.
Is there a way to make the gradle project sources be up to date at all time to the maven project without installing it to m2?
IntelliJ build uses IDE's own jps project model and builder for compiling the java-based projects. Including incremental build support. With Gradle build it actually uses Gradle to build the project (think Gradle build task).
Short answer: yes. There's no conflict between having two independent build scripts for the same project, one in Maven and one in Gradle.
IntelliJ IDEA supports a fully-functional integration with Gradle that helps you automate your building process. You can easily create a new Gradle project, open and sync an existing one, work with several linked projects simultaneously, and manage them.
Open your Maven project in Intellij IDEA and then open "Terminal" tab. Write gradle init . Wait until the building process ends and then save & close your project. Reopen your project and click Auto-import, and wait while Gradle is running.
You have to in InteliJ:
RIGHT CLICK
on your Maven project and from the context menu select Open Module Settings (F4) voilà!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With