Denis Rosca
Denis Rosca

Reputation: 3469

Run SBT without installing it first

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.

Upvotes: 14

Views: 1950

Answers (2)

M. Justin
M. Justin

Reputation: 21239

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.

Upvotes: 2

Dale Wijnand
Dale Wijnand

Reputation: 6102

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

Upvotes: 10

Related Questions