Skip to content

Instantly share code, notes, and snippets.

@anthonynsimon
Last active June 23, 2017 08:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anthonynsimon/4f8c1ba051dc297b9ef1c9bfcccc5150 to your computer and use it in GitHub Desktop.
Save anthonynsimon/4f8c1ba051dc297b9ef1c9bfcccc5150 to your computer and use it in GitHub Desktop.
Generate sbt project structure
#!/bin/bash
# Usage: script [project name]
PROJECT_NAME=$1
mkdir -p $PROJECT_NAME
cd $PROJECT_NAME
touch build.sbt
touch README.md
mkdir -p project
touch project/plugins.sbt
mkdir -p src/{main/{scala,resources,java},test/{scala,resources,java}}/
cat << EOF >> project/plugins.sbt
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.5")
EOF
cat << EOF >> build.sbt
name := "$PROJECT_NAME"
organization := ""
version := "0.1.0"
scalaVersion := "2.12.2"
cancelable in Global := true
lazy val versions = new {
val example = "0.0.0"
}
libraryDependencies ++= Seq()
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment