8

I have a Java Intellij Idea project that contains multiple modules that I wish to convert to a gradle project. Is there a way to add gradle to an existing project with multiple modules? I want to be able to use gradle to compile and generate JAR files (via artifacts) and generate JavaDocs using gradle.

Intellij Idea version: Intellij Idea CE v2016.3.1
Gradle version: Gradle 3.2.1
Java version: 1.8.0_112
Javac version: 1.8.0_112

5
  • Please have a look in this post: stackoverflow.com/questions/26745541/… Commented Dec 22, 2016 at 18:23
  • It need not be either/or. You can still use IntelliJ with Gradle or Maven. Commented Dec 22, 2016 at 18:27
  • @NeelmaniGhimire I went to the link you provided. Created a build.gradle file. Added apply plugin: 'idea' and apply plugin: 'java'. Ran gradle cleanIdea and gradle idea. The thing I'm looking for is for intellij idea generate the gradle file based on the modules it has. The gradle file be able to compile, run, generate JavaDocs and create JAR files from the artifacts in the project. Is there a way to do that? Commented Dec 28, 2016 at 15:52
  • 1
    @Clumsy-Coder Did you ever solve this? I'm in the same situation, I use the Artifacts to create a WAR, JAR into an EAR. Also, want all the Project Structure | Libraries added as dependencies to the gradle.build too. Commented Jul 10, 2018 at 14:44
  • Does this answer your question? Convert Java Project to Gradle Project in Intellij Commented Nov 17, 2021 at 9:18

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.