Skip to content

Instantly share code, notes, and snippets.

@raymanoz
Created January 29, 2014 15:36
Show Gist options
  • Save raymanoz/8690461 to your computer and use it in GitHub Desktop.
Save raymanoz/8690461 to your computer and use it in GitHub Desktop.
Include action to be run after compile in an sbt build
yourTask <<= (fullClasspath in Runtime) map {classpath =>
val loader: ClassLoader = ClasspathUtilities.toLoader(classpath.map(_.data).map(_.getAbsoluteFile))
loader.loadClass("your.class.Here").newInstance()
} triggeredBy(compile in Compile)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment