title: Android Studio: Dependencies not included in Java module using Gradle 4.1
body: <p>I have a Java module that generates some metadata for my Android app and needs to run as a regular Java application. After updating to Android Studio 3.0 (in 2.3.3 it worked as expected) I get a <code>NoClassDefFoundError</code> for the dependencies (in the case below for <code>com/google/gson/GsonBuilder</code>, the <code>main</code> method itself can be found).</p>
  
  <p>I even tried putting the GSON Jar into the <code>libs</code> folder but it still throws the <code>NoClassDefFoundError</code>.</p>
  
  <p>I assume the dependencies are not properly included. Any idea how to fix this?</p>
  
  <p>The <code>build.gradle</code> looks like this: </p>
  
  <pre><code>apply plugin: 'java'
  
  dependencies {
      implementation fileTree(dir: 'libs', include: ['*.jar'])
      implementation 'com.google.code.gson:gson:2.8.1'
  }
  
  sourceCompatibility = "1.7"
  targetCompatibility = "1.7"
  </code></pre>
  
  <p>My class looks like this: </p>
  
  <pre><code>import com.google.gson.GsonBuilder;
  
  public class myClass {
      public static void main(String[] args) {
          GsonBuilder builder = new GsonBuilder();
      }
  }
  </code></pre>