My Dos and Don’ts in sbt Build Definitions

From the website:

So without further ado, here are my personal Dos and Don’ts

  • Don’t make separate build.sbt files for your different modules
  • Do stay away from bare settings
  • Don’t let your settings leak into modules they don’t need to be in
  • Do regularly go over your entire build definition
  • Don’t shade things unless you absolutely have to
  • Do stick to lazy vals everywhere
  • Don’t ever hardcode constants
  • Do stay away from crazy meta meta build stuff
  • Don’t put stuff in project/ unless it is a collection of something or is “standalone”
  • Do have a conversation with your team about standards and consistency
  • Don’t make your own way to do something if sbt already provides a way
  • Do document it when you do weird sh*t
  • Don’t add stuff to your build definition you don’t understand