title: How to download dependency sources for Gradle project in IDEA?
body: <p>It appears that the eclipse plugin uses the following mechanism to do this:</p>
  
  <pre class="lang-groovy prettyprint-override"><code>apply plugin: 'java'
  apply plugin: 'eclipse'
  
  eclipse {
      classpath {
         downloadSources=true
      }
  }
  </code></pre>
  
  <p>but I can't find a corresponding option for the idea plugin.  What am I missing?</p>
  
  <p>Here's the build.gradle file:</p>
  
  <pre class="lang-groovy prettyprint-override"><code>apply plugin: 'groovy'
  apply plugin: 'idea'
  
  repositories {
      mavenCentral()
      mavenRepo name: "Grails", url: "http://repo.grails.org/grails/repo/"
  }
  
  dependencies {
      groovy 'org.codehaus.groovy:groovy-all:2.0.4'
      compile 'org.slf4j:slf4j-log4j12:1.6.6', 'postgresql:postgresql:9.1-901.jdbc4', 'net.sourceforge.nekohtml:nekohtml:1.9.16'
      ['core', 'hibernate', 'plugin-datasource', 'plugin-domain-class'].each { plugin -&gt;
          compile "org.grails:grails-$plugin:2.1.0"
      }
  }
  
  idea {
      module {
          downloadJavadoc = true
          downloadSources = true
      }
  }
  
  // Fat Jar Option (http://docs.codehaus.org/display/GRADLE/Cookbook#Cookbook-Creatingafatjar)
  jar {
      from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
  }
  
  task wrapper(type: Wrapper) {
      gradleVersion = '1.0'
  }
  </code></pre>