Intellij cannot recognize the src folder via srcDirs properties
If I specify the sourceSets.main.java.srcDirs += ["./src] in build.gradle for a java project, Intellij will automatically mark the folder as "Sources" and make the folder's icon in blue. However, intellij wont automatically the folder as "Sources" by srcDirs = ["src"] for a flex project. If I manually mark it as Sources in project settings, it will rollback to the normal folder after I run gradle build.
Keyboard shortcuts
Generic
| ? | Show this help |
|---|---|
| ESC | Blurs the current field |
Comment Form
| r | Focus the comment reply box |
|---|---|
| ^ + ↩ | Submit the comment |
You can use Command ⌘ instead of Control ^ on Mac
Support Staff 1 Posted by Yennick Trevels on 24 Jan, 2014 06:55 PM
Hi,
Currently GradleFx doesn't support Intellij (and GradleFx does not use sourceSets to define source folders), so that's why Intellij isn't picking it up.
As for the rollback, not sure why that happens. Is the idea task being run whenever you do a build which could reset this?
Gr,
Yennick
Support Staff 2 Posted by Maxime Cowez on 24 Jan, 2014 08:04 PM
Perhaps Wood means running the Gradle build through IntelliJ. I've never used this feature, but I can imagine that JetGradle (that's the IntelliJ Gradle integration plugin) does this rollback because it can't find a valid sourcePath (because it doesn't know about GradleFx'
srcDirsconfig.@Wood If that's the case, perhaps you can work around the issue by adding the Flex sourcce dir to the java source sets. GradleFx will ignore it and hopefully it will prevent IntelliJ from resetting the source folders. I doubt you'll have any luck building with JetGradle and GradleFx though.
I briefly talked to someone at JetBrains about integrating GradleFx, but I think our user base is a bit too small at the moment to get anything done in that area.