Crash Course in building your First Gradle Plugin
summary
A minimal Gradle plugin is built that converts a project graph into Mermaid JS diagrams and is published as a module called module-graphing; implementation uses the Java Gradle Plugin, an abstract extension class with @Inject Project properties, an abstract task with annotated action and declared inputs/outputs for caching, and an apply() entry point that prints "did something" when configured. Tests use JUnit 5 with fast unit tests via ProjectBuilder and 700 ms functional tests via Gradle TestKit, and publishing uses the publishToMavenLocal flow so consuming projects add mavenLocal and the plugin runs successfully.
AI-written summary · about
chapters (7)
- 0:00Introduction
- 2:59Gradle plugin basics
- 7:54Plugin structure and components
- 14:57Testing Gradle plugins
- 21:12Publishing plugins
- 23:57Consuming plugins
- 25:42Live demo and next steps
related talks
33mCrash Course in building your First Gradle Plugin
42mRock the Gradle, rule the world
44mGetting To Your Third Plugin
01h 49mInside the Gradle DSL
01h 59mGradle: Give Your Build Some Love and It Will Return It!
01h 15mKeeping growing software projects under control with Gradle
22mGradle Ex Machina
21mSupercharge Android Studio: Developing Your First Plugin
