sbt compile tasks with different options
问题 I have a basic sbt project. I want to package two jars with the same source files, but compilation with different options. So one project, 2 compilations but with different options (scalacOptions) and 2 jars as output. I don't want to execute sbt twice, changing the options. Does anybody have an idea? 回答1: With something like this in build.sbt, you can run sbt compile2:package and produce both a jar from the compile config and compile2 config: val Compile2 = config("compile2") extend Compile