SBT plugins for publishing to Maven Central, shading and managing dependencies, reporting to Coveralls from TravisCI, and more
Scala
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
assembly
base
deps
g8
github
js/src
lib/src/main/scala/org/hammerlab/sbt
maven
parent
project
root
scala
spark
test
travis
versions
.gitignore
.gitmodules
.travis.yml
LICENSE
README.md
build.sbt

README.md

sbt-parent

Maven Central

SBT plugins reducing boilerplate for a variety of commmon tasks:

  • assembly: building+publishing thin shaded JARs
  • deps: dependency-management DSL and helpers
  • maven: publishing to Maven Central, filling POM fields, adding resolvers
  • github: filling in scmInfo information (and populating relevant POM fields)
  • parent: wrapper for all the plugins here, including aliases for common dependencies
  • root: configuring multi-module projects
  • scala: managing/setting Scala versions
  • spark: configuring projects that use Apache Spark
  • test: using ScalaTest, publishing -tests JARs
  • travis: interfacing with Coveralls and TravisCI
  • versions: managing dependency-versions

To depend on all of them, add to project/plugins.sbt:

addSbtPlugin("org.hammerlab.sbt" % "parent" % "4.2.0")

They are also available individually:

// Settings for publishing to Maven Central 
addSbtPlugin("org.hammerlab.sbt" % "maven" % "4.0.0")

// Adding GitHub-repo info
addSbtPlugin("org.hammerlab.sbt" % "github" % "4.1.0")

// etc.

Subprojects' READMEs contain more info about their functionality.

A derivative of parent with hammerlab-specific configs can also be found in the base module.

Examples

hammerlab projects demonstrating use of various plugins from this repo :

  • math-utils
    • multi-module project with classpath-dependencies between modules
    • cross-published for Scala 2.11 and 2.12
    • wildcard-imports at sbt console startup
  • io-utils
  • spark-bam
    • multiple modules
    • shading+renaming of dependencies
    • many different dependency-configurations
    • inter-module test-scoped dependencies

Using

Add to project/plugins.sbt of an existing project:

addSbtPlugin("org.hammerlab.sbt" % "parent" % "4.2.0")

or create a new project using giter8:

g8 hammerlab/sbt-parent.g8

(This template lives at hammerlab/sbt-parent.g8)