sbt-scalashim generates Scala shim like sys.error.
addSbtPlugin("com.eed3si9n" % "sbt-scalashim" % "0.2.2")
resolvers += Resolver.url("sbt-plugin-releases",
new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/"))(Resolver.ivyStylePatterns)Add the following in your build.sbt:
scalaShimSettings
sourceGenerators in Compile <+= scalaShimWhen you reload the settings and compile, this generates a fake sys object under scalashim package for 2.8.x.
The supported methods are sys.error, sys.exit, sys.runtime, sys.props, sys.env, and sys.allThreads.
To use them, add import scalashim._ in your source code.
To customize the package:
scalaShimPackage := "something"MIT License for sbt-scalashim code. Scala License for the generated sys code.