add javaOptions in proguard := Seq("-Xmx...") to your project settings
Update
Well, I know that I know what the problem is. If you print the following command in an sbt session:
show proguard::java-options
it will print you the [info] List(-Xmx2G) , which means that in your proguard configuration the heap size is set to 2GB , but if you try this command: show proguard:proguard::java-options , it will show you the [info] List(-Xmx256M) , which is used in proguardTask. Taking this into account, I assume that you have something similar in the project settings:
lazy val main = Project( id = "project", base = file("."), settings = Seq(javaOptions in proguard := Seq("-Xmx2G")) ++ proguardSettings)
Basically what happens, proguardSettigns uses the default configuration and erases your javaOptions settings by the fact that the task uses the task pane for this command.
So add this line:
javaOptions in (SbtProguard.Proguard, proguard) := Seq("-Xmx2G")
to your settings, it should look something like this:
lazy val main = Project( id = "project", base = file("."), settings = proguardSettings ++ Seq( javaOptions in (SbtProguard.Proguard, proguard) := Seq("-Xmx2G") )
and now call show proguard:proguard::java-options , it will show you the [info] List(-Xmx2G) . You can also enable the global log for the session and see if everything is fine: set logLevel in Global := Level.Debug
Update
I prefer the Build.scala files, but in *.sbt simpler, just add these lines in the following order:
import com.typesafe.sbt.SbtProguard._ import com.typesafe.sbt.SbtProguard.ProguardKeys.proguard proguardSettings javaOptions in (Proguard, proguard) := Seq("-Xmx2G")
maintaining order and line breaks between lines