(bug?) "Create directories for empty content roots automatically" not available for New Project with Gradle
I recently started IntelliJ and found that lot of tutorials with Gradle (and not a few posts in this community) say to check the box "Create directories for empty content roots automatically" when starting a new project with Gradle.
Problem: That check box is not available when starting a new project. Screenshot: https://imgur.com/a/22glWIr.
Is this a bug or a did someone decide that this feature was unnecessary? I'm guessing the former because one of IDEA's own tutorials from June 2017 referenced the option (https://www.youtube.com/watch?v=JwPYjnhah3g).
From Help->About:
IntelliJ IDEA 2018.1.5 (Community)
Build #IC-181.5281.24, built on June 12, 2018
Note: I *can* open Settings -> Build, Execution, and Deployment -> Build Tools -> Gradle, and I can check the option under "Project-level settings", but that is a bit useless for new projects because the default seems to be "off" and I can't turn it on for new projects.
Please advise. Is there anything I can do to fix this, or will you need to fix it for your next release?
请先登录再写评论。
Hi.
Sources folders should be always created for newly created gradle project using IntelliJ
File ->New->Projec/Moduletgradle wizard.There is a known issue when it doesn't happen if the first import failed, you can track the issue at IDEA-177410
I am not seeing "Modulet" gradle wizard in File -> New -> Project.
This is what I'm seeing and using: https://imgur.com/a/cEVVFpp
Hi, It's a mistype, I meant Project or Module, what I meant is that Sources folders are always created by default in 2018.1
Sorry for the late reply.
By "Sources folders" do you mean "src->main->java" and "src->test->java"? Because those are not created by default on my installation (default install options). As stated previously, the option to create "sources folders" is default off. I have to go to Settings -> Build, Execution, and Deployment -> Build Tools -> Gradle, and manually check the option under "Project-level settings", then "apply" in order to create them.
But you say that these folders are "always created by default". My observation is contrary. I can't show you a desktop-capture video to prove my situation (don't have software to do that). Do you have another idea of how I can show you what's going on?
Hi. Could you please provide an example of the project you are importing?
I could, but main.java won't help. From the original post, the problem (lack of "create directories for empty project roots" option for new project) was found "when starting a new project with Gradle". I am not importing any project at this time. I have still only started a new project.
I could still give you main.java if you want.
So is this a bug?
Hi. I have double checked, it is a regression, thank you for reporting. Please follow this ticket for updates:
https://youtrack.jetbrains.com/issue/IDEA-195963
Fo me, on a Mac, I couldn't find "Settings -> Build, Execution, and Deployment -> Build Tools -> Gradle", The path to this adjustment was (from the Mac menu bar at the top of the screen for the Intellij App: "IntellijIDEA -> Preferences -> Build, Execution, and Deployment -> Build Tools -> Gradle"
And these options were only available after creating the project.