sbt-export-repo exports your dependency graph to a preloaded local repository.
This is an experimental plugin provided as-is.
Add the following to project/exportrepo.sbt
:
addSbtPlugin("com.eed3si9n" % "sbt-export-repo" % "0.1.0")
Then, create dist
subproject in build.sbt
:
lazy val root = (project in file(".")).
aggregate(app, dist).
settings(
inThisBuild(List(
scalaVersion := "2.11.8",
organization := "com.example",
version := "0.1.0-SNAPSHOT"
)),
name := "something root",
publish := (),
publishLocal := ()
)
// Your normal subproject
lazy val app = (project in file("app"))
// This subproject is used for exporting repo only
lazy val dist = (project in file("dist")).
enablePlugins(ExportRepoPlugin).
dependsOn(app). // add your subprojects to export
settings(
name := "dist",
// add external libraries too. why not?
libraryDependencies += "org.typelevel" %% "cats" % "0.6.0",
publish := (),
publishLocal := ()
)
> publishLocal
> dist/exportRepo
This will create an Ivy repo image under dist/target/preloaded-local
containing the transitive dependencies of both the internal and external dependencies you added to dist
(e.g. app
and Cats).
- Export repo feature was extracted from Lightbend Activator's build, in particular typesafehub/activator@03f2e3 by @jsuereth
Apache-2.0