https://github.com/hammerlab/sbt-parent
SBT plugins for publishing to Maven Central, shading and managing dependencies, reporting to Coveralls from TravisCI, and more
https://github.com/hammerlab/sbt-parent
Last synced: about 1 year ago
JSON representation
SBT plugins for publishing to Maven Central, shading and managing dependencies, reporting to Coveralls from TravisCI, and more
- Host: GitHub
- URL: https://github.com/hammerlab/sbt-parent
- Owner: hammerlab
- License: apache-2.0
- Created: 2016-11-12T04:29:46.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2020-11-13T16:37:48.000Z (over 5 years ago)
- Last Synced: 2025-04-04T09:44:40.800Z (about 1 year ago)
- Language: Scala
- Homepage:
- Size: 441 KB
- Stars: 14
- Watchers: 7
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sbt-parent
[](https://travis-ci.org/hammerlab/sbt-parent)
[SBT](http://www.scala-sbt.org/) plugins reducing boilerplate for a variety of commmon tasks
## Modules
### [`assembly`](assembly) [](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.hammerlab.sbt%22%20a%3A%22assembly%22)
- `sbt-assembly` wrapper
- building+publishing thin shaded JARs
### [`base`] [](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.hammerlab.sbt%22%20a%3A%22base%22)
- wraps all modules in this project
- adds many [hammerlab](https://github.com/hammerlab/) library-aliases default configs
### [`deps`](deps) [](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.hammerlab.sbt%22%20a%3A%22deps%22)
Dependency-management DSL and helpers
### [`github`](github) [](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.hammerlab.sbt%22%20a%3A%22github%22)
Fill in `scmInfo` information, populate other relevant POM fields
### [`js`](js) [](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.hammerlab.sbt%22%20a%3A%22js%22)
Shorthands and dependency-aliases for [ScalaJS](https://www.scala-js.org/) projects
### [`maven`](maven) [](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.hammerlab.sbt%22%20a%3A%22maven%22)
Publish to Maven Central, fill POM fields, add default resolvers
### [`parent`] [](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.hammerlab.sbt%22%20a%3A%22parent%22)
- wrapper for all the plugins here
- includes aliases for common dependencies
### [`root`](root) [](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.hammerlab.sbt%22%20a%3A%22root%22)
Configure multi-module projects
### [`scala`](scala) [](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.hammerlab.sbt%22%20a%3A%22scala%22)
DSL and settings for managing Scala versions
### [`spark`](spark) [](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.hammerlab.sbt%22%20a%3A%22spark%22)
Configure projects that use [Apache Spark](http://spark.apache.org/)
### [`test`](test) [](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.hammerlab.sbt%22%20a%3A%22test%22)
Use [ScalaTest](http://www.scalatest.org/), publish `-tests` JARs
### [`travis`](travis) [](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.hammerlab.sbt%22%20a%3A%22travis%22)
Interface with [Coveralls](https://coveralls.io/) and [TravisCI](https://travis-ci.org/)
### [`versions`](versions) [](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.hammerlab.sbt%22%20a%3A%22versions%22)
Manage dependency-versions
## Usage
### All modules: [`parent`]/[`base`]
To depend on all the modules above, add the `parent` plugin to `project/plugins.sbt`:
```scala
addSbtPlugin("org.hammerlab.sbt" % "parent" % "4.6.7")
```
The `base` module also wraps that and adds many [hammerlab](https://github.com/hammerlab/) library-aliases:
```scala
addSbtPlugin("org.hammerlab.sbt" % "base" % "4.6.7")
```
### Individual modules
The modules above are also all available individually:
```scala
// 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](https://github.com/hammerlab) projects demonstrating use of various plugins from this repo :
- [math-utils](https://github.com/hammerlab/math-utils/blob/master/build.sbt)
- 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](https://github.com/hammerlab/io-utils/blob/master/build.sbt)
- [spark-bam](https://github.com/hammerlab/spark-bam/blob/master/build.sbt)
- 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:
```scala
addSbtPlugin("org.hammerlab.sbt" % "parent" % "4.6.7")
```
or create a new project using [giter8](http://www.foundweekends.org/giter8/):
```bash
g8 hammerlab/sbt-parent.g8
g8 hammerlab/sbt-base.g8
```
(These templates live at [hammerlab/sbt-parent.g8](https://github.com/hammerlab/sbt-parent.g8) / [hammerlab/sbt-base.g8](https://github.com/hammerlab/sbt-base.g8))
[`parent`]: parent
[`base`]: base