title: Add Classpath in Manifest file of jar in gradle in java 8
body: <p>I need to add the data in MANIFEST.MF of jar file in below format I tried the below method but not able to achieve it. i need it in below way. I'm using gradle 2.3 and java</p>
  
  <pre><code>java version "1.8.0_66"
  Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
  Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
  </code></pre>
  
  <p>My build.gradle</p>
  
  <pre><code>`apply plugin: 'java'
  repositories {
      mavenCentral()
  }
  
  dependencies {
      compile 'org.slf4j:slf4j-api:1.7.12'
      compile 'org.apache.logging.log4j:log4j-slf4j-impl:2.4'
      compile 'org.apache.logging.log4j:log4j-api:2.4'
      compile 'org.apache.logging.log4j:log4j-core:2.4'
      compile 'commons-cli:commons-cli:1.3.1'
      compile 'commons-io:commons-io:2.4'
      testCompile 'junit:junit:4.12' 
  }
  
  jar {
      sourceCompatibility = 1.7 //Java version compatibility to use when compiling Java source.
      targetCompatibility = 1.7 //Java version to generate classes for.
      compileJava.options.debugOptions.debugLevel = "source,lines,vars" // Include debug information
  
      manifest {
        attributes(
           "Manifest-Version": "1.0",
           "Class-Path": configurations.compile.collect { "libs/" + it.getName() }.join(' ')     
        )
     }
  }`
  </code></pre>
  
  <p>i've got this text in MANIFEST.MF</p>
  
  <pre><code>Manifest-Version: 1.0
  Class-Path: libs/slf4j-api-1.7.12.jar libs/log4j-slf4j-impl-2.4.jar li
   bs/log4j-api-2.4.jar libs/log4j-core-2.4.jar libs/commons-cli-1.3.1.j
   ar libs/commons-io-2.4.jar
  </code></pre>
  
  <p>any ideas? How to properly write down a list of libraries in manifest? If I remove extra spaces with newline, the jar file is runs.</p>