title: gradle: dependencies are not being built first which give a "cannot find symbol" error
body: <p>I'm try to convert a maven project into gradle via 'gradle init' and googling the errors after doing a '<strong>gradlew clean jar -x test</strong>'.  I'm stumped on the latest error.  The problem seems like a dependency order where BasicTypeHelper is not being built first.</p>
  
  <pre><code>$ ./gradlew clean jar -x test
  [...]
  
  &gt; Task :exec-parent:vector:compileJava FAILED
  warning: [options] bootstrap class path not set in conjunction with -source 1.7
  /home/hudson/workarea/drill/exec/vector/src/main/java/org/apache/drill/exec/record/MaterializedField.java:30: error: cannot find symbol
  import org.apache.drill.exec.expr.BasicTypeHelper;
                                   ^
    symbol:   class BasicTypeHelper
    location: package org.apache.drill.exec.expr
  /home/hudson/workarea/drill/exec/vector/src/main/java/org/apache/drill/exec/vector/complex/reader/FieldReader.java:20: error: package org.apache.drill.exec.vector.complex.reader.BaseReader does not exist
  import org.apache.drill.exec.vector.complex.reader.BaseReader.ListReader;
                                                               ^
  /home/hudson/workarea/drill/exec/vector/src/main/java/org/apache/drill/exec/vector/complex/reader/FieldReader.java:21: error: package org.apache.drill.exec.vector.complex.reader.BaseReader does not exist
  import org.apache.drill.exec.vector.complex.reader.BaseReader.MapReader;
                                                               ^
  /home/hudson/workarea/drill/exec/vector/src/main/java/org/apache/drill/exec/vector/complex/reader/FieldReader.java:22: error: package org.apache.drill.exec.vector.complex.reader.BaseReader does not exist
  import org.apache.drill.exec.vector.complex.reader.BaseReader.RepeatedListReader;
                                                               ^
  /home/hudson/workarea/drill/exec/vector/src/main/java/org/apache/drill/exec/vector/complex/reader/FieldReader.java:23: error: package org.apache.drill.exec.vector.complex.reader.BaseReader does not exist
  import org.apache.drill.exec.vector.complex.reader.BaseReader.RepeatedMapReader;
                                                               ^
  /home/hudson/workarea/drill/exec/vector/src/main/java/org/apache/drill/exec/vector/complex/reader/FieldReader.java:24: error: package org.apache.drill.exec.vector.complex.reader.BaseReader does not exist
  import org.apache.drill.exec.vector.complex.reader.BaseReader.ScalarReader;
  [...]
  </code></pre>
  
  <p>The build.gradle file in the drill/exec/vector directory is the following:</p>
  
  <pre><code>apply plugin: 'java'
  apply plugin: 'antlr'
  apply plugin: 'groovy'
  
  group = 'org.apache.drill.exec'
  description = 'exec/Vectors'
  dependencies {
    antlr "org.antlr:antlr:3.5.2" // use ANTLR version 3
  
    compile project(':drill-protocol')
    compile project(':drill-common')
    compile project(':exec-parent:memory-parent:drill-memory-base')
      compile group: 'joda-time', name: 'joda-time', version:'2.9'
      compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version:'2.7.9'
      compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version:'2.7.9.1'
      compile group: 'com.google.protobuf', name: 'protobuf-java', version:'2.5.0'
      compile group: 'com.carrotsearch', name: 'hppc', version:'0.7.1'
      compileOnly(group: 'org.apache.hadoop', name: 'hadoop-common', version:'2.7.1') {
  exclude(module: 'servlet-api')
  exclude(module: 'servlet-api-2.5')
  exclude(module: 'servlet-api-2.5')
  exclude(module: 'servlet-api')
  exclude(module: 'jetty-util')
  exclude(module: 'hadoop-yarn-api')
  exclude(module: 'jets3t')
  exclude(module: 'log4j')
  exclude(module: 'slf4j-log4j12')
  exclude(module: 'mockito-all')
  exclude(module: 'commons-logging-api')
  exclude(module: 'commons-logging')
  exclude(module: 'jersey-core')
  exclude(module: 'jersey-server')
  exclude(module: 'jersey-json')
  exclude(module: 'jersey-client')
  exclude(module: 'core')
  exclude(module: 'jackson-core-asl')
  exclude(module: 'jackson-mapper-asl')
  exclude(module: 'jackson-xc')
  exclude(module: 'jackson-jaxrs')
  exclude(module: 'netty')
      }
  }
  
  task packageTests(type: Jar) {
    from sourceSets.test.output
    classifier = 'tests'
  }
  artifacts.archives packageTests
  
  $ ./gradlew --version
  
  ------------------------------------------------------------
  Gradle 4.5.1
  ------------------------------------------------------------
  
  Build time:   2018-02-05 13:22:49 UTC
  Revision:     37007e1c012001ff09973e0bd095139239ecd3b3
  
  Groovy:       2.4.12
  Ant:          Apache Ant(TM) version 1.9.9 compiled on February 2 2017
  JVM:          1.8.0_111 (Oracle Corporation 25.111-b14)
  OS:           Linux 3.13.0-32-generic amd64
  </code></pre>