title: Gradle show content of compile configuration of a sub project
body: <p>Try to show a configuration content of sub project foo:</p>
  
  <pre><code>task foo {
  
      project(':foo').configurations.compile.files.each { 
          println it.name
      }
  
      project(':foo').configurations.compileClasspath.files.each { 
          println it.name
      }
  
  }
  </code></pre>
  
  <p>Error</p>
  
  <pre><code>* What went wrong:
  A problem occurred evaluating project ':foo'.
  &gt; Cannot change dependencies of configuration ':foo:compile' after it has been resolved.
  </code></pre>
  
  <p>I am confused with configurations.compile and configurations.compileClasspath. Are they the same? both are FileCollection?</p>
  
  <p>For current project (not :foo), they contain the same set of files. </p>