Appendix B. Migrating to autoplugins

So you want to use autoplugins. This quick guide explains how to take an existing (< sbt 0.13.0) plugin and upgrade it to the new AutoPlugin interface.

The sbt 0.13.5 release brought the developer preview of the new interface for plugins in sbt, called sbt.AutoPlugin. The new interface aims to fix two primary issues with sbt plugins:

  • The ability for plugins to automatically and safely register themselves into a user’s build
  • The ability for plugins to depend on other plugins

Before we discuss migrating, let’s look at how most plugins looked prior to sbt 0.13.5.

B.1. Older sbt plugins

Most plugins in the ecosystem are nothing more than jar files that contain a set of utility methods for the sbt DSL, ...

Get sbt in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.