sbt plugin to add and configure redacted compiler plugin and annotation library in your sbt build.
In your project/plugins.sbt
add the following line
addSbtPlugin("io.github.polentino" % "sbt-redacted" % "1.0.0")
and then enable it in your specific (sub)project in build.sbt
like so
lazy val root = (project in file("."))
.enablePlugins(RedactedPlugin)
.setting(
redactedVersion := "0.7.1"
// your usual config goes here
)
That's it! You can now start using redacted in your project 🎉
According to the
sbt plugin development guidelines,
local development must have -SNAPSHOT
version:
Before you start, set your version to a -SNAPSHOT one because scripted-plugin will publish your plugin locally. If you don’t use SNAPSHOT, you could get into a horrible inconsistent state of you and the rest of the world seeing different artifacts.
On the other hand, the CI needs a proper release version to be published. For this reason, there's a little task called
checkStatus
to ensure the proper version is used locally and in the CI pipeline: its purpose is to force usage of
-SNAPSHOT
version on a local repo, while ensuring the CI runs with a proper release version of the project.
Once you modified version.sbt
to include a -SNAPSHOT
suffix, you can execute the command
sbt scripted
to execute the local installation & tests execution of the plugin.