title: how to include my test in application jar
body: <p>I am using Gradle build in my java application. My project has the elasticsearch intergation test. Following is my gradle.build </p>
  
  <pre><code>jar {
      baseName = 'myproject'
      version = 'V.4.0.0'
      manifest {
          attributes 'Main-Class': 'com.myapp.Application'
      }
       from {
      configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
      }
  }
  test {
      systemProperties = System.properties
      systemProperty 'tests.security.manager', 'false'
  }
  </code></pre>
  
  <p>When i give <code>gradle build</code> it executed the test and created the <code>myproject-V.4.0.0.jar</code>. but when i run the </p>
  
  <pre><code>java -cp myproject-V.4.0.0.jar;junit-4.11.jar junit.textui.TestRunner com.myapp.test.testclassname
  </code></pre>
  
  <p>i got class not found exception for com.myapplication.test.testclassname.
  I extracted the myproject-V.4.0.0.jar and can not find the test class. </p>
  
  <p>My question is, How can i include the test class also in my application jar?</p>