title: compile scala to assembly jar with SBT or gradle
body: <p>I asked about it yesterday, but this one is not duplicated. </p>
  
  <p>I can use sbt or gradle to compile helloworld, however when it comes to some other object, I have new problems. Following is what I did can anyone tell me how to fix it?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>tong@tong-VirtualBox:/usr/local/jars$ sudo mkdir Log
  tong@tong-VirtualBox:/usr/local/jars$ cd Log
  tong@tong-VirtualBox:/usr/local/jars/Log$ mkdir -p src/main/scala
  tong@tong-VirtualBox:/usr/local/jars/Log$ mkdir -p src/main/resources
  tong@tong-VirtualBox:/usr/local/jars/Log$ mkdir -p src/test/scala
  tong@tong-VirtualBox:/usr/local/jars/Log$ mkdir -p src/test/resources
  tong@tong-VirtualBox:/usr/local/jars/Log$ cd src/main/scala
  tong@tong-VirtualBox:/usr/local/jars/Log/src/main/scala$ mkdir -p com/tong/gradle
  tong@tong-VirtualBox:/usr/local/jars/Log/src/main/scala$ vi com/tong/gradle/Log.scala
  
   
  package org.apache.spark.h2o.utils
  
  import water.fvec.{NewChunk, Frame, Chunk}
  import water._
  
  /** Transformation from double vector to log vector. */
  class Log extends MRTask[Log] {
    override def map(c: Chunk, nc: NewChunk): Unit = {
     for (row &lt;- 0 until c.len()) {
     nc.addNum(Math.log(c.atd(row)))
     }
    }
  }
  
   
  
  tong@tong-VirtualBox:/usr/local/jars/Log/src/main/scala$ cd ../../..
  tong@tong-VirtualBox:/usr/local/jars/Log$ vi build.gradle
  
  apply plugin: 'scala'
   
   jar {
          baseName = 'tong'
          version = '1.0'
          manifest {
                       attributes 'Main-Class': 'com.tong.gradle.Log' }
  
       }
  dependencies {
    compile 'org.scala-lang:scala-library:2.10.4'
  }
  
  tong@tong-VirtualBox:/usr/local/jars/Log$ gradle build
  :compileJava UP-TO-DATE
  :compileScala
  
  FAILURE: Build failed with an exception.
  
  * What went wrong:
  Could not resolve all dependencies for configuration ':compile'.
  &gt; Could not find org.scala-lang:scala-library:2.10.4.
    Required by:
        :Log:unspecified
  
  * 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: 6.917 secs</code></pre>
  </div>
  </div>
  </p>
  
  <p>Or its also great if you can tell me how to do it in SBT Thanks!</p>