title: Error when creating JAR file with Gradle on IntelliJ
body: <p>I need to convert my Java project to an executable JAR file with Gradle and I keep getting this error: &quot;archive is not a ZIP archive&quot;. Here is a screenshot of the error: <a href="https://imgur.com/dFG0U34.png" rel="nofollow noreferrer">https://imgur.com/dFG0U34.png</a></p>
  <p>I'm not quite sure why this is happening. I've tried different things in my build.gradle but nothing seems to work. It still creates the JAR, but it seems to miss some dependencies, probably because it runs into the error before it can compile all of the dependencies.</p>
  <p>Here is my build.gradle:</p>
  <pre><code>plugins {
      id 'java'
  }
  
  group 'onixo-dev'
  version ''
  
  repositories {
      jcenter()
  }
  
  dependencies {
      compile 'net.dv8tion:JDA:4.2.0_227'
      compile 'com.jagrosh:jda-utilities:3.0.5'
      compile 'com.squareup.okio:okio:2.10.0'
      compile 'net.sf.trove4j:trove4j:3.0.3'
      compile group: 'org.apache.commons', name: 'commons-collections4', version: '4.1'
      compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.12.1'
  }
  
  jar {
      manifest {
          attributes &quot;Main-Class&quot;: &quot;onixodev.Main&quot;
      }
  
      from {
          configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
      }
  }
  </code></pre>
  <p>Any help would be super appreciated!</p>