I have a separate resource folder which I want to add to IDEA classpath. The reason I don't use main/resources is I need to have the folder outside of JAR to allow XML config files edition.
This is what works in IDEA
apply plugin: 'idea'
idea {
module {
resourceDirs += file('src/dist/etc')
}
}
When I press "reimport from Gradle" the folder is mapped as Resource Folder. So IDEA understands resourceDirs property.
But Gradle 2.2 fails:
Could not find property 'resourceDirs' on org.gradle.plugins.ide.idea.model.IdeaModule_Decorated@329c1075.
How can I set a resource dir in IDEA from Gradle?
idea.module.resourceDirs += file('src/dist/etc')
Should work since Gradle 4.7 where support for specifying idea resourceDirs has been added.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With