title: How to compile scala into runnable jar file
body: <p>I didnt find a good way to compile scala in Linux so I tried following commands, </p>
  
  <pre><code>mkdir runnablescala
  cd runnablescala
  mkdir -p src/main/scala
  mkdir -p src/main/resources
  mkdir -p src/test/scala
  mkdir -p src/test/resources
  cd src/main/scala
  mkdir -p com/johnathanmarksmith/gradle
  vi com/johnathanmarksmith/gradle/HelloWorld.scala
  
  package com.johnathanmarksmith.gradle;
   object HelloWorld {
      def main(args: Array[String]) {
        println("Hello, world!")
      }
    }
  
  cd ../../..
  vi build.gradle
  
  apply plugin: 'scala' 
  
   jar { 
          baseName = 'smith' 
          version = '1.0' 
          manifest { 
                       attributes 'Main-Class': 'com.johnathanmarksmith.gradle.HelloWorld' } 
       }
  gradle build
  </code></pre>
  
  <p>The build failed with this result</p>
  
  <pre><code>:compileJava UP-TO-DATE
  :compileScala FAILED
  
  FAILURE: Build failed with an exception.
  
  * What went wrong:
  Execution failed for task ':compileScala'.
  &gt; 'compileScala.scalaClasspath' must not be empty
  
  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
  
  BUILD FAILED
  </code></pre>
  
  <p>Can anyone tell me how to compile scala? thanks! Do I need anyother plug in or something?  </p>