Chapter 11. Defining a plugin

This chapter covers

  • Getting to know the AutoPlugin interface and using it to make life easier for the user
  • Testing a plugin with sbt scripted
  • Using configurations in your plugin
  • Adding incremental tasks
  • Reusing code using Scala files

In this chapter we’ll go into the nuts and bolts of constructing a plugin. Plugins are the primary vehicle of reuse within sbt. As you saw previously, when you want your build to do something, the first thing to do is look for a plugin. If you don’t find one, go ahead and add the custom functionality. Once you have the functionality working in your own build, sbt plugins provide a means for you to share it with the rest of the sbt ecosystem.

What is a plugin? A plugin is a ...

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.