Posts

Showing posts with the label Sbt

Conditional AddSbtPlugin Based On ScalaVersion

Answer : tl;dr It's not possible given the description of the problem. There are at least two build configurations involved in a sbt project - the real project (you want to bet your money on) and the meta build for the build of your project. Yes, I know it sounds a little weird, but it's a very powerful concept IMHO. See sbt is recursive: The project directory is another build inside your build, which knows how to build your build. To distinguish the builds, we sometimes use the term proper build to refer to your build, and meta-build to refer to the build in project. The projects inside the metabuild can do anything any other project can do. Your build definition is an sbt project. sbt runs atop Scala and requires a strict version of it. No way to change it unless you fancy spending time on things you should really not be touching in the first place :) What you can do is to apply the plugin in project/plugins.sbt and then, in the project, apply the settings of the plu...