Skip to content

Instantly share code, notes, and snippets.

@danclien
Last active December 30, 2015 05:29
Show Gist options
  • Save danclien/7782973 to your computer and use it in GitHub Desktop.
Save danclien/7782973 to your computer and use it in GitHub Desktop.
Personal notes on starting a new Scala project
  • Use GitHub's default .gitignore file for Scala
    • Add .DS_Store/ to .gitignore
  • Use ./project/Build.scala over ./Build.sbt
  • Add to ./project/plugins.scala with latest version numbers
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.10.1")

addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.1.2")

addSbtPlugin("io.spray" % "sbt-revolver" % "0.7.1")

addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.5.2")

// addSbtPlugin("com.github.gseitz" % "sbt-release" % "0.8")

// addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.7.4")
  • Namespaces
    • Avoid starting with .com, .org, .net, etc. (This is against standard Java conventions)
    • Use all lowercase letters without spaces or hyphens
      • Ex. myawesomeprojectname.core
  • Folder structure
    • Modifed
project/
  Build.scala
  plugins.scala
src/
  main/
    resources/
       <files to include in main jar here>
    scala/
       <main Scala sources>
  test/
    resources
       <files to include in test jar here>
    scala/
       <test Scala sources>
.gitignore
README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment