Created
September 6, 2014 15:20
-
-
Save sathish316/aa16c32837ee5065acde to your computer and use it in GitHub Desktop.
init-scala.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PROJECT_NAME="$1" | |
SCALA_VERSION="2.10.3" | |
SCALATEST_VERSION="2.2.1" | |
MOCKITO_VERSION="1.8.5" | |
mkdir $PROJECT_NAME | |
cd $PROJECT_NAME | |
cat > build.sbt << EOF | |
name := "$PROJECT_NAME" | |
version := "1.0" | |
scalaVersion := "$SCALA_VERSION" | |
libraryDependencies += "org.scalatest" %% "scalatest" % "$SCALATEST_VERSION" % "test" | |
libraryDependencies += "org.mockito" % "mockito-core" % "$MOCKITO_VERSION" % "test" | |
EOF | |
mkdir -p "src/main/scala" | |
mkdir -p "src/main/resources" | |
mkdir -p "src/test/scala" | |
mkdir -p "src/test/resources" | |
mkdir "project" | |
cat > project/plugins.sbt << EOF | |
addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.6.0") | |
EOF | |
cat > .gitignore << EOF | |
target/ | |
.DS_Store | |
.idea | |
.idea_modules | |
EOF | |
git init | |
git add .gitignore | |
git add build.sbt | |
git add project | |
git commit -m 'Initial commit' | |
# You need to have the idea plugin in the global SBT's plugins/build.sbt | |
sbt gen-idea |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment