Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run SBT without installing it first

Tags:

sbt

I was wondering if SBT has something similar to the Gradle Wrapper?

I would like to use it on a CI server without having to install SBT first. The documentation mentions a sbt-launcher, but that seems to be geared towards running actual application instead of builds.

like image 334
Denis Rosca Avatar asked May 18 '16 09:05

Denis Rosca


2 Answers

Yes, sbt-extras is a bash script that you can commit to your repository to act like the gradle wrapper.

like image 88
Dale Wijnand Avatar answered Oct 20 '22 00:10

Dale Wijnand


The sbt-extras project is centered around a stand-alone script called sbt which can be directly used to run sbt without having it on the machine first.

The script has logic to determine the proper version of sbt for the project, download the correct version of the sbt jar, and then run the tasks through sbt.

If you copy the sbt script into your project, you can simply call it — from your CI server, locally, or wherever — to run sbt tasks without needing sbt installed separately.

like image 39
M. Justin Avatar answered Oct 20 '22 02:10

M. Justin