debug settings for java project?

Hi,

I have inherited a java gradle project and I am trying to get my settings right.

The project can be build with gradle in the windows CLI without problem, however I am not able to get the project to build, run or debug directly in intellij.
The gradle build actually compiles 2 seperate java projects. When trying to debug, run or build in intellij the main project throws errors about the second java project that supposedly does not exist ("java: package com.company.packagename does not exist").
In the debug/run settings I have set the main class and I have set "Before launch, run gradle task" which is supposed to build both projects (again this works correctly in gradle command line).
Clearly I am doing something wrong.
Anyone knows what is going wrong?

Kind regards,

b.

0
2 comments

Hard to say without actually knowing the project structure (directories and how the are configured in IDEA).

Do you have the sources of both projects configured in IDEA?
Else I guess you would have to add the artifacts of the second project as a library.

(I am no gradle expert and know even less about IDEA's gradle support, so maybe I miss some angle.)

0

You either need to import both projects in IDEA or import the root Gradle multiproject instead that defines the dependencies between these two projects.

0

Please sign in to leave a comment.