
Lectures
If you are here to learn about Gradle plugins from scratch or dive deeper into a specific topic you are welcome to start watching lectures.
Consultation or Code Review
While if you purchased this course with the hope that you will find something helpful to resolve your existing problem with Gradle plugins or with your buildscript, dependencies or tasks, I am offering you a FREE consultation as part of this course. Don't hesitate, for the free consultation or code review for up to one hour, drop me a message and we can arrange a session.
Best Regards, Renato
This lecture contains an example of local script plugin implementation.
Plugins will be applied in multiple different project, for sure we will need to adapt plugin default behavior in those as they have various requirements. Luckily this is supported by the Gradle extensions in a convenient way.
Writing automated tests for Gradle plugin.
Overview of testing pyramid.
jvm-test-suite plugin for organizing different types of tests.
JUnit5 unit tests.
You should have a decent coverage of your main plugin logic with JUnit tests.
Functional tests written with the help of Gradle TestKit library and GradleRunner class.
Those are trickier to set up and are longer running as whole Gradle build will be executed reading concrete Gradle build and settings files. While they will give you additional confidence that you will deliver functioning software and will be able to avoid breaking existing functionality with new changes.
Walk through Gradle 8.x upgrade.
Wrap-up of the 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.