Skip to content

Instantly share code, notes, and snippets.

@xuwei-k
Created December 14, 2014 16:40
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save xuwei-k/10cfe7ff6699fdfa04c4 to your computer and use it in GitHub Desktop.
Save xuwei-k/10cfe7ff6699fdfa04c4 to your computer and use it in GitHub Desktop.
scalaVersion := "2.11.4"
libraryDependencies += "org.scalaz" %% "scalaz-core" % "7.1.0"
libraryDependencies += "org.scala-lang" % "scalap" % scalaVersion.value
InputKey[Unit]("scalap") := {
import complete.DefaultParsers._
val classes = spaceDelimited("<class names>").parsed
val classpath = "-classpath" :: (fullClasspath in Compile).value.map(_.data).mkString(":") :: Nil
val args = "-verbose" :: classpath ::: classes.toList
scala.tools.scalap.Main main args.toArray
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment