Gradle Plugin Development
Make your custom extensions of Gradle build logic structured and maintainable
What you will learn
Build custom Gradle plugin
Get free Gradle consultation or code review if you have concrete questions.
Learn about different types of Gradle plugins
Extract Gradle script into standalone Gradle plugin
Write Gradle plugins with Gradle 8.x version
Understand how to apply custom Gradle plugin in real life
Learn how to deploy plugin to Gradle Plugin Portal
Create extension that provides DSL configuration block for your plugin.
Cover plugin logic with unit (JUnit5) and functional tests (Gradle TestKit).
Why take this course?
Is this course for you?
Are you an experienced Java, Android developer or someone that is using Gradle to automate builds for applications in private time, at faculty or in your job? Is your Gradle logic in the build script getting complex? Do you need to share your build logic between multiple standalone projects within your team or would you like to make it public for the whole world? Would you like to understand how Gradle plugins work under the hood? Then this course is exactly for you. It's time to roll up your sleeves and get busy!
Content
You will find all the information you need to successfully create your first Gradle plugin or improve your existing Gradle plugins and understand every bit of the logic along the way. You'll experience Gradle 8.x and Java 17 in action.
You will learn, how to create:
Script Plugin
It's the easiest and most straight forward way to create useful Gradle plugin in no time.
Precompiled Script Plugin
If you want to bring plugin implementation to advanced level you should get familiar with precompiled plugins. It brings the possibility to structure the plugin, easily test and debug it.
Binary Plugin
Write and package your plugin like ordinary application with the Gradle API. I will use Java language to write components of the plugin like the implementation of the Plugin interface that has to implement apply() method.
Publishing
Publish your binary plugin to
Local Maven repo (testing)
Private Maven Repo (enterprises, can't share)
Gradle Plugin Portal (sharing is caring)
Extensions
Making binary Gradle plugins flexible through the extension block configuration in a DSL fashion.
Testing
If you are serious about your plugin then covering its logic with tests that will verify your requirements and protect you from regressions is the way to go. In the testing section you will see how you can test internal parts with JUnit5 and wrap it up with functional tests written with the help of TestKit GradleRunner class.
Structure
Every topic will be explained through theory first. After going through presentations you will be challenged to apply acquired knowledge in extensive quizzes.
The goal of the course is to give you the most in depth information about Gradle plugins in one place you can find online.