Create recognize source directories from plugin

I have a gradle project in which I have applied the groovy plugin. Is there a way to get intellij to automatically recognize src/main/groovy and src/test/groovy as source folders? I manually added them as source and test roots respectively.

Please sign in to leave a comment.