Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
alexarchambault committed May 11, 2020
1 parent 6df52f6 commit 895e7f7
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@


[![Build Status](https://travis-ci.org/coursier/sbt-shading.svg?branch=master)](https://travis-ci.org/coursier/sbt-shading)
[![Maven Central](https://img.shields.io/maven-central/v/io.get-coursier/lm-coursier_2.12.svg)](https://maven-badges.herokuapp.com/maven-central/io.get-coursier/lm-coursier_2.12)

Use like
Enable the plugin with
```scala
addSbtPlugin("io.get-coursier" % "sbt-shading" % "2.0.0")
```
in `project/plugins.sbt`. sbt-shading requires sbt >= 1.3.0.

Then use settings like the following:
```scala
// Enable the plugin
enablePlugins(ShadingPlugin)
Expand All @@ -20,14 +25,14 @@ libraryDependencies += "io.argonaut" %% "argonaut" % "6.2"
shadedModules += "io.argonaut" %% "argonaut"

// Tell the plugin to rename some namespaces in the output JAR.
// This renames any of our classes in this namespace, and adjust
// This renames any of our classes in this namespace, and adjusts
// any reference in this namespace.
// Be sure that all classes in this namespace are effectively
// in the output JAR.
shadingRules += ShadingRule.moveUnder("argonaut", "test.shaded")

// Tell the plugin that the output JAR can contain classes in that
// namespace. Fail loudly if it find any class outside of it.
// namespace. Fail loudly if it finds any class outside of it.
validNamespaces += "test"
```

0 comments on commit 895e7f7

Please sign in to comment.