title: Adding a Jenkinsfile for compilation by Gradle
body: <p>I have a Gradle build with the source sets configured like so:</p>
  
  <pre><code>sourceSets {
      main {
          groovy {
              srcDir 'src'
          }
      }
  }
  </code></pre>
  
  <p>I have a <code>Jenkinsfile</code> in the root project directory that I would like to have compiled so that I can detect non-valid Groovy before it gets merged to the master branch and breaks the Jenkins build.</p>
  
  <p>How can I add this single file to the source sets of the Gradle project for compilation? How can I ensure that Gradle compiles it even though it's not got a <code>.groovy</code> extension?</p>