Reputation: 93
When using gradle/Java I know what to check in (gradle wrapper/gradle shell script) and what not to check in (.gradle) and instead have in my .gitignore.
What should one check in for a activator/sbt projects for Scala?
I see the following files in a recent project I created:
I don't see any useful guides for this via a google search on on the sbt reference manual.
Ok, this might help a bit. I decided to create a new project (using activator). I did template = minimal-scala and project name minimal-scala. It created the following files:
hostname:minimal-scala username$ find . -type f
./.gitignore
./activator
./activator-launch-1.2.12.jar
./activator.bat
./build.sbt
./LICENSE
./project/build.properties
./src/main/scala/com/example/Hello.scala
./src/test/scala/HelloSpec.scala
hostname:minimal-scala username$ cat .gitignore
/RUNNING_PID
/logs/
/project/*-shim.sbt
/project/project/
/project/target/
/target/
I'm guessing this means, I should checkin the .gitignore as is, the src tree, build.sbt, project (everything but what was noted in .gitignore), activator jar and launching sh and bat files.
Upvotes: 7
Views: 929
Reputation: 4999
IMO, you should check in only those files which are absolutely necessary to build a project.
Build.sbt - necessary. You can't build the project without it.
project - project contains plugins and Build.scala files which are necessary. Check those in. It usualy contains the target folder which should not be checked in.
I use sbt for everything and eclipse as IDE. Others might use activator but it is not necessary. This is a personal preference which should not be part of your build.
It comes down to this basically, how much a new person needs to download before being productive. You check in activator which he might not even need.
Upvotes: 3
Reputation: 5296
I would check in all of the dirs/files above except for 'target'. target is the end result of a build. In general, you want to check in files so that someone else can do a 'git clone' and start working off that with minimal fuss.
Also by the way, don't check in things like passwords, aws keys, and the like :(
Upvotes: 1