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
From the course: Learning Gradle
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Build files and conventions4m 29s
-
Defining and configuring a task5m 28s
-
The directed acyclic graph (DAG)2m 44s
-
Build lifecycle phases2m 41s
-
Applying reusable functionality with plugins3m 20s
-
Domain object runtime representation2m 44s
-
Referencing the documentation2m 30s
-
Challenge: Define and execute a task1m 29s
-
Solution: Define and execute a task7m 55s
-
-