scalac has [`-release` option](https://github.com/scala/scala/blob/v2.13.1/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala#L85) dotc should support this option too.