Skip to content
This repository

Merge pull request #68 from jsimone/master

Remove copying of
latest commit 3f8f9e1dda
naaman naaman authored
Octocat-spinner-32 bin Remove props use when executing sbt. April 14, 2014
Octocat-spinner-32 opt Add support for SBT 0.13.1 April 06, 2014
Octocat-spinner-32 test Remove props version test. April 14, 2014
Octocat-spinner-32 LICENSE add MIT license March 21, 2012
Octocat-spinner-32 cedar is default November 14, 2012

Heroku buildpack: Scala

This is a Heroku buildpack for Scala apps. It uses sbt 0.11.0+.


Example usage:

$ ls
Procfile build.sbt project src

$ heroku create --buildpack

$ git push heroku master
-----> Heroku receiving push
-----> Scala app detected
-----> Building app with sbt
-----> Running: sbt clean compile stage

The buildpack will detect your app as Scala if it has the project/ and either .sbt or .scala based build config. It vendors a version of sbt and your popluated .ivy/cache into your slug. The .ivy2 directory will be cached between builds to allow for faster build times.


To use this buildpack, fork it on Github. Push up changes to your fork, then create a test app with --buildpack <your-github-url> and push to it.

For example, to reduce your slug size by not including the .ivy2/cache, you could add the following.

for DIR in $CACHED_DIRS ; do 
rm -rf $CACHE_DIR/$DIR 
mkdir -p $CACHE_DIR/$DIR 
cp -r $DIR/.  $CACHE_DIR/$DIR 
# The following 2 lines are what you would add
echo "-----> Dropping ivy cache from the slug" 
rm -rf $SBT_USER_HOME/.ivy2 

Note: You will need to have your build copy the necessary jars to run your application to a place that will remain included with the slug.

Commit and push the changes to your buildpack to your Github fork, then push your sample app to Heroku to test. You should see:

-----> Dropping ivy cache from the slug


Licensed under the MIT License. See LICENSE file.

Something went wrong with that request. Please try again.