I haven't used GCJ at all, and I'm still pretty new to SBT, but I'm sure you could write a brief task to exactly accomplish what you are looking for with SBT 0.7.1. You can use PathFinder to capture all class files as follows:
val allClasses = (outputPath
Using this PathFinder method and top-level "compileClasspath", you can create a task that will run gcj using the current path to the project class and compile all .class files into a single gcjFile file:
val gcj = "/usr/local/bin/gcj"
val gcjFile = "target/my_executable.o"
val allClasses = (outputPath ##) ** "*.class"
lazy val gcjCompile = execTask {
<x>{gcj} --classpath={compileClasspath.get.map(_.absolutePath).mkString(":")} -c {allClasses.get.map(_.absolutePath).mkString("-c ")} -o {gcjFile}</x>
} dependsOn(compile) describedAs("Create a GCJ executable object")
Aaron source
share