title: How to build sources JAR with Gradle?
body: <p>I am working with an open source project that is built with Gradle. I would like to generate a <em>(project)-sources.jar</em> file that I can load into my IDE (IntelliJ IDEA) and debug through the project. I know how to load the file if I can generate it.</p>
  <p>I have looked through the available Gradle tasks for the project and there isn't one that generates a sources jar file.</p>
  <p>What is the easiest way to generate a sources jar file for this project?</p>
  <p>Adding the source into the jar file that contains the compiled class files would be fine as well.</p>