Skip to content

Instantly share code, notes, and snippets.

@youribonnaffe youribonnaffe/gist:7401737
Last active Mar 30, 2018

What would you like to do?
Gradle IDEA add project dependencies instead of JAR dependencies in Intellij configuration file (.iml)
apply plugin: 'idea'
idea.module.iml {
def customDependencies = ['org.objectweb.proactive', 'org.ow2.proactive']
whenMerged { module ->
// to reorder dependencies
def existingDependencies = module.dependencies
module.dependencies = new LinkedHashSet()
configurations.compile.resolvedConfiguration.resolvedArtifacts.each {
if ( == || customDependencies.contains( ) {"Custom idea: adding ${}")
module.dependencies.add(new org.gradle.plugins.ide.idea.model.ModuleDependency(, 'COMPILE'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.