gradle and idea scopes

Answered

I have a custom configuration scope in gradle named "server". How can I add this scope to the idea compile scopes? I have tried the following:

 

idea {

    module {

        scopes.COMPILE.plus += [configurations.server]

    }

}

 

However when I resync the idea project with the gradle build file, I end up with all of the dependencies being removed from the artifact and have to manually add the dependencies back to the artifact.

 

I would like all of the dependencies in the "server" configuration scope to be added to the idea artifact.

3 comments
Comment actions Permalink

There is a related request at https://youtrack.jetbrains.com/issue/IDEABKL-7013, but no plans to address it any time soon.

0
Comment actions Permalink

Hmm, I could be wrong, but I don't think I need custom IDEA scopes. I just want to add my custom gradle configuration scope to the existing IDEA compile scope. I have done this with a provided configuration scope.

 

configurations {

    provided 

}

idea {

    module {

        scopes.PROVIDED.plus += [configurations.provided]

    }

}

0
Comment actions Permalink

any thoughts on the above?

0

Please sign in to leave a comment.