sbt / sbt-export-repo   0.1.1

Apache License 2.0 GitHub

exports your dependency graph to a preloaded local repository

sbt-export-repo

sbt-export-repo exports your dependency graph to a preloaded local repository.

This is an experimental plugin provided as-is.

setup

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 := ()
  )

usage

> 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).

credits

license

Apache-2.0