From the course: Learning Gradle

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Applying reusable functionality with plugins

Applying reusable functionality with plugins

From the course: Learning Gradle

Start my 1-month free trial

Applying reusable functionality with plugins

- [Narrator] Every Gradle build definition starts with a build script. The more you work on different build automation projects, the more you will notice that certain build code is similar or even the same. To avoid having to copy/paste build code from project to project, Gradle introduced the concept of a so-called plugin. There are two types of plugins, script plugins and binary plugins. A script plugin is just another build script that can be included into your main build.gradle file. The primary reason for wanting to use the script plugin is to split up the build logic and make it more maintainable. Binary plugins are meant for more complex logic bundled into a JAR file. The reason being that they can reuse the functionality across multiple self-contained software projects, and those software projects usually live in different version control repositories. Let's have a look at some code examples. In this scenario…

Contents