title: ClassNotFoundException when building with gradle and trying to use com.google.code.gson
body: <p>I'm new to Java projects and gradle. I'm trying to use Google's GSON to parse a JSON string. </p>
  
  <p>When I navigate to my-project-name/build/classes/main/ </p>
  
  <p>I get the ClassNotFoundException when I run </p>
  
  <pre><code>$ java GetGroupMeMessages 
  </code></pre>
  
  <p>Here is the stack trace (That's what it's called, right?): </p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: com/google/gson/Gson
      at GetGroupMeMessages.main(GetGroupMeMessages.java:59)
  Caused by: java.lang.ClassNotFoundException: com.google.gson.Gson
      at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      ... 1 more
  </code></pre>
  
  <p>My build.gradle file looks like this:</p>
  
  <pre><code>apply plugin: 'java'
  apply plugin: 'eclipse'
  
  sourceCompatibility = 1.8
  version = '1.0'
  jar {
      manifest {
          attributes 'Implementation-Title': 'gscc-groupme-logs',
                     'Implementation-Version': version
      }
  }
  
  repositories {
      mavenCentral()
  }
  
  dependencies {
      compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.8.6'
      compile group: 'commons-collections', name: 'commons-collections', version: '3.2.2'
      compile group: 'com.google.code.gson', name: 'gson', version: '2.8.0'
      testCompile group: 'junit', name: 'junit', version: '4.+'
  }
  
  test {
      systemProperties 'property': 'value'
  }
  
  uploadArchives {
      repositories {
          flatDir {
              dirs 'repos'
          }
      }
  }
  </code></pre>
  
  <p>I'm doing everything from the command line. 
  I've got my files saved under my-project-name/src/main/java/ </p>
  
  <p>Any help is much appreciated! I am stuck. </p>