Skip to content

Instantly share code, notes, and snippets.

@lazyval
Last active August 29, 2015 14:01
Show Gist options
  • Save lazyval/90027f227114d48aa080 to your computer and use it in GitHub Desktop.
Save lazyval/90027f227114d48aa080 to your computer and use it in GitHub Desktop.
toLong for java string
organization := "com.github.lazyval"
name := "default"
// version is defined in version.sbt in order to support sbt-release
scalaVersion := "2.10.1"
scalacOptions ++= Seq("-unchecked", "-deprecation", "-Xlint")
initialCommands in console := "import com.github.lazyval._"
scalaSource in Compile := baseDirectory.value
scalaSource in Test := baseDirectory.value
javaSource in Compile := baseDirectory.value
javaSource in Test := baseDirectory.value
resourceDirectory in Compile := baseDirectory.value
resourceDirectory in Test := baseDirectory.value
package com.github.lazyval;
public class JavaApi {
public static String foo() {
return "123";
}
}
import com.github.lazyval.JavaApi
object ScalaApp extends App {
println("Here is the usage of java api: " + JavaApi.foo.toLong)
}
version in ThisBuild := "0.1.0-SNAPSHOT"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment