How to add Content Root automatically to build.gradle

Answered

So I have difficulties adding a content folder directory using build.gradle.

For eclipse there's a way to do it using linkedResource via build.gradle.

I have tried this:

apply plugin: 'java'
apply plugin: 'idea'

idea {
module { contentRoot = file("${project.ext.basedir}/${project.name}/System".toString()) } }

 

But then when I looked at my directory, all I see is my drive letter like this: example Q: Q:\

How do I get it to work via build.gradle so it would look like this where the System folder is my content root?



0
1 comment
Avatar
Yaroslav Bedrov

Hello,

Is it possible to provide sample project example for investigation? It seems to work fine with my test project.

 

0

Please sign in to leave a comment.