Setting compiler options with SBT

There’s a lot of misinformation out there re. how to set javac and scalac compiler options in sbt. You might see stuff about defining a custom Build object in a .scala file. Or a custom Project object. It’s all nonsense. I guess it applies to previous versions of sbt. In sbt 0.11.2, you set javac and scalac compiler options as shown on the sbt examples page here: