-
-
Save joost-de-vries/952a1a8769e587c35ded to your computer and use it in GitHub Desktop.
run scalap for your project from sbt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scalaVersion := "2.11.4" | |
libraryDependencies += "org.scala-lang" % "scalap" % scalaVersion.value | |
InputKey[Unit]("scalap") := { | |
import complete.DefaultParsers._ | |
val classes = spaceDelimited("<class names>").parsed | |
val pathSeparator = java.lang.System.getProperty("path.separator") | |
val classpath = "-classpath" :: (fullClasspath in Compile).value.map(_.data).mkString(pathSeparator) :: 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