Captain Obvious
Captain Obvious

Reputation: 785

Scala sbt file dependency from github repository

Is it possible to include a dependency from github? The repository does not have a jar file, just a build.sbt file and a source folder.

Upvotes: 2

Views: 1317

Answers (1)

Yuval Itzchakov
Yuval Itzchakov

Reputation: 149518

You can create a new project which points to the source in your build.sbt and then use dependsOn:

lazy val projectIDependOn = RootProject(uri("git://github.com/user/Project.git"))

lazy val myProject = project in file("my-project").dependsOn(projectIDependOn)

An alternative approach would be to clone to github repository and then use sbt-assembly to create an uber JAR you can use, but that requires a bit more work.

Upvotes: 3

Related Questions