hammerlab / sbt-parent   2.0.0

Apache License 2.0 GitHub

SBT plugins for publishing to Maven Central, shading and managing dependencies, reporting to Coveralls from TravisCI, and more

Scala versions: 2.12
sbt plugins: 1.0

sbt-parent

SBT plugins reducing boilerplate for a variety of commmon tasks

Modules

  • sbt-assembly wrapper
  • building+publishing thin shaded JARs
  • wraps all modules in this project
  • adds many hammerlab library-aliases default configs

Dependency-management DSL and helpers

Fill in scmInfo information, populate other relevant POM fields

Shorthands and dependency-aliases for ScalaJS projects

Publish to Maven Central, fill POM fields, add default resolvers

  • wrapper for all the plugins here
  • includes aliases for common dependencies

Configure multi-module projects

DSL and settings for managing Scala versions

Configure projects that use Apache Spark

Use ScalaTest, publish -tests JARs

Interface with Coveralls and TravisCI

Manage dependency-versions

Usage

All modules: parent/base

To depend on all the modules above, add the parent plugin to project/plugins.sbt:

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

The base module also wraps that and adds many hammerlab library-aliases:

addSbtPlugin("org.hammerlab.sbt" % "base" % "4.6.7")

Individual modules

The modules above are also all available individually:

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

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

// etc.

Subprojects' READMEs contain more info about their functionality.

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

or create a new project using giter8:

g8 hammerlab/sbt-parent.g8
g8 hammerlab/sbt-base.g8

(These templates live at hammerlab/sbt-parent.g8 / hammerlab/sbt-base.g8)