title: Gradle 'error: package com.google.common.collect does not exist'
body: <p>I am following a little test script and providing it with the first piece of code to make it green. The code is java and the testing is gradle with java. Java is version "1.8.0_60" on Mac OSX "El Capitan". <code>gradle</code> is version 2.8.</p>
  
  <p>After using <code>gradle build</code>, here is the error shown:</p>
  
  <pre><code>$ gradle build
  :compileJava
  /Users/rsalazar/exercism/java/etl/src/main/java/Etl.java:1: error: package  com.google.common.collect does not exist
  import com.google.common.collect.ImmutableMap;
                              ^
  /Users/rsalazar/exercism/java/etl/src/main/java/Etl.java:9: error: cannot find symbol
      return ImmutableMap.of("a", 1);
             ^
    symbol:   variable ImmutableMap
    location: class Etl
  2 errors
  :compileJava FAILED
  
  FAILURE: Build failed with an exception.
  
  * What went wrong:
  Execution failed for task ':compileJava'.
  &gt; Compilation failed; see the compiler error output for details.
  
  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
  
  BUILD FAILED
  
  Total time: 2.597 secs
  </code></pre>
  
  <p>Here is the <code>build.gradle</code> file:</p>
  
  <pre><code>apply plugin: "java"
  apply plugin: "eclipse"
  apply plugin: "idea"
  
  repositories {
    mavenCentral()
  }
  
  dependencies {
    testCompile "junit:junit:4.10"
    testCompile "org.easytesting:fest-assert-core:2.0M10"
    testCompile "com.google.guava:guava:16+"
  }
  </code></pre>
  
  <p>Here is the test: (<code>EtlTest.java</code>)</p>
  
  <pre><code>import com.google.common.collect.ImmutableMap;
  import org.junit.Test;
  
  import java.util.Arrays;
  import java.util.List;
  import java.util.Map;
  
  import static org.fest.assertions.api.Assertions.assertThat;
  
  public class EtlTest {
    private final Etl etl = new Etl();
  
    @Test
    public void testTransformOneValue() {
      Map&lt;Integer, List&lt;String&gt;&gt; old = ImmutableMap.of(1, Arrays.asList("A"));
      Map&lt;String, Integer&gt; expected = ImmutableMap.of("a", 1);
  
      assertThat(etl.transform(old)).isEqualTo(expected);
    }
  }
  </code></pre>
  
  <p>Here is the code under test: (<code>Etl.java</code>)</p>
  
  <pre><code>import com.google.common.collect.ImmutableMap;
  
  import java.util.Arrays;
  import java.util.List;
  import java.util.Map;
  
  public class Etl {
    public Map&lt;String, Integer&gt; transform(Map &lt;Integer, List&lt;String&gt;&gt; from) {
      return ImmutableMap.of("a", 1);
    }
  }
  </code></pre>
  
  <p>I am not looking for help on making the test pass. Just help on making the testing compile with gradle. I am sorry to say I am stuck when compiling with the error message provided. I couldn't find any help on the net. Thanks much!</p>