Understanding Gradle #36 – Task Actions
Tweak what a task is doing by adding or modifying task actions. 🚀 Online course - Modern Gradle Fundamentals https://www.udemy.com/course/modern-gradle-fundamentals/?referralCode=3AC1B96C0EBE6F4FBE6E 🏎️ Training on your Gradle topics https://onepiece.software/#training ✨ Support with your Gradle project https://onepiece.software/#consulting 💚 Support my work https://paypal.me/onepiecesw 💙 Follow me on Mastodon https://mastodon.social/@jendrik ▶️ 0:00 Tasks and Task Actions ▶️ 1:20 Implement a task action as method ▶️ 3:18 Add a task action dynamically ▶️ 5:20 Use configuration cache ▶️ 5:49 Separate configuration and execution time state ▶️ 7:33 Modify actions of registered tasks ▶️ 8:46 Add logging output ▶️ 10:16 Remove existing task action ▶️ 11:10 Re-implement removed action ▶️ 12:21 Summary 💾 Example on GitHub (Kotlin DSL): https://github.com/jjohannes/understanding-gradle/tree/main/36_Task_Actions 💾 Example on GitHub (Groovy DSL): https://github.com/jjohannes/understanding-gradle/tree/groovy-dsl/36_Task_Actions Related Videos: ⏩ 04 Tasks: https://www.youtube.com/watch?v=9tY4MFEgmgM&list=PLWQK2ZdV4Yl2k2OmC_gsjDpdIBTN0qqkE ⏩ 05 Lifecycle Tasks: https://www.youtube.com/watch?v=sOo0p4Gpjcc&list=PLWQK2ZdV4Yl2k2OmC_gsjDpdIBTN0qqkE ⏩ 06 Configuring Task Inputs and Outputs: https://www.youtube.com/watch?v=Pj9hSRauiQM&list=PLWQK2ZdV4Yl2k2OmC_gsjDpdIBTN0qqkE ⏩ 07 Implementing Tasks and Extensions: https://www.youtube.com/watch?v=wrgyUKC7vOY&list=PLWQK2ZdV4Yl2k2OmC_gsjDpdIBTN0qqkE ⏩ 23 Caching: https://www.youtube.com/watch?v=nHb0kIcTrFE&list=PLWQK2ZdV4Yl2k2OmC_gsjDpdIBTN0qqkE Further Readings: 📕 Configuring Tasks: https://docs.gradle.org/current/userguide/more_about_tasks.html#sec:configuring_tasks 📕 'doFirst' / 'doLast' and Configuration Cache: https://docs.gradle.org/current/userguide/common_caching_problems.html#suggestions_for_authoring_your_build
Download
1 formatsVideo Formats
Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.