src folder not created when creating simple Intellij java gradle Project

mcfly soft :

I am following the instructions to create a simple IntelliJ Project with Gradle support and the src folder is not created (I guess this is the base of any Java Project) https://www.jetbrains.com/help/idea/getting-started-with-gradle.html

  1. New Project: I check Gradle and Java - next
  2. Added Artefact ID -> next
  3. "Use auto-import", "using explicit module groups", "create separate Module per source set", "Use default Gradle wrapper" -> next
  4. Give a project name -> next

I have no src folder. I am not able to add a new class.

enter image description here

When doing the same without gradle I have the src folder.

UPDATE Adding a module called "src" works, but then I have a module called src and a folder in it called src. But this is a hack. Just bought IntelliJ for 200 bucks and I hope this can be solved in a more professional way :-)

mcfly soft :

For Windows the solution is. To go manually into: File -> Settings -> Build, Execution, Deployment -> Gradle -> check the "Create directories for empty content roots automatically".

For Mac the solution is. To go manually into: Intellij IDEA -> Preferences -> Build, Execution, Deployment -> Build Tools -> Gradle -> check the "Create directories for empty content roots automatically".

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=423934&siteId=1