title: Gradle Application plugin: Need to include src in distribution
body: <p>I'm using Gradle's application plugin to bundle up a runtime for my application that includes required libraries and shell scripts to launching.  This is all working fine with the following:</p>
  
  <pre><code>apply plugin: 'groovy'
  apply plugin: 'application'
  
  applicationName = "appName"
  mainClassName = 'com.myApp.cli.ScriptRunner'
  
  buildDir = "${System.properties['user.home']}/.myApp/build"
  archivesBaseName = 'myApp'
  version = "1.0"
  group = 'myApp'
  
  sourceSets {
    main {
      groovy {
        srcDir 'src/groovy'
        exclude '**/web/**'
      }
      java {
        srcDir 'src/java'
      }
  
    }
  }
  
  startScripts {
    classpath  = files('$APP_HOME/lib/*')
  }
  
  
  repositories {
    mavenCentral()
  }
  
  
  dependencies {
    // dependencies omitted for brevity
  }
  </code></pre>
  
  <p>I found <a href="http://www.gradle.org/docs/current/userguide/application_plugin.html" rel="nofollow">from here</a> that I can use applicationDistribution to include additional files.  The problem I'm running into is how to tell it which files I need.  I tried the following thinking this was the right approach:</p>
  
  <pre><code>task copySrc(type:Copy) {
    from('src/groovy/com/myApp/receiver') {
      include '**/*.groovy'
    }
    into "$buildDir/src"
  }
  
  task createSrc {
    def src = file("$buildDir/src")
    outputs.dir src
    doLast {
      src.mkdirs()
      copySrc
    }
  }
  
  applicationDistribution.from(createSrc) {
    into "src"
  }
  </code></pre>
  
  <p>However, I don't ever see copySrc getting called and I'm not even sure if that is possible.  Suggestions are welcome.</p>