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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.