I'm using sbt and its Proguard plugin to create an executable jar for my program. However, my program relies on scala-compiler.jar
at runtime to do compilations. I can't seem to get scala-compiler.jar
into my final jar. This page has some very similar information but I can't get it to work beginning to end. Any suggestions?
EDIT: This is the closest I have gotten:
override def proguardOptions = List(
"-dontshrink -dontoptimize -dontobfuscate -dontpreverify -dontnote " +
"-ignorewarnings",
proguardKeepAllScala
)
override def proguardInJars =
Path.fromFile(scalaLibraryJar) +++
Path.fromFile(FileUtilities.scalaCompilerJar) +++
super.proguardInJars
That includes the compiler jar in the proguard min jar, but running it I still get:
Exception: java.lang.NoClassDefFoundError: scala/tools/nsc/settings/Scala Settings