Gradle Plugin, Take Control of the Build!
summary
Shows how to implement a real Gradle plugin using a Genymotion example: the plugin needs five files (build.gradle, plugin class, descriptor, task class, extension) and can copy reports with only a few lines of code. Demonstrates creating an extension, generating tasks, the need to perform injection in afterEvaluate to handle task-graph timing, plus testing with project.evaluate, publishing to local/Maven/JCenter, and pitfalls when wiring tasks to Android test targets.
AI-written summary · about
chapters (21)
- 0:00Gradle introduction
- 2:29Key definitions
- 9:07Simple test task
- 11:35Why build a plugin
- 12:57Plugin project structure
- 16:30Gradle conventions
- 17:54Plugin main class
- 23:15Plugin user extension
- 26:03Plugin descriptor role
- 27:05Build and compile plugin
- 28:54Binary export
- 29:55Using the plugin
- 32:23Plugin demo
- 34:28Debug task graph
- 38:26Gradle events
- 40:10Plugin task types
- 42:59Dynamic task creation
- 46:14Future Gradle improvements
- 47:15Plugin testing
- 48:18Publishing the plugin
- 50:08Conclusion
related talks
49mGradle plugins: take it to the next level (en)
21mMake Gradle work for you, create your own tasks and plugins
33mUnderstanding Gradle and writing your own Gradle Plugin
35mHow to write Gradle plugins (in Kotlin)
01h 03mPower of Gradle
56mDeep Dive into the Android Gradle Plugin
35mGradle, the Ultimate Alligator(Delegator)
49mGradle Ex Machina
