From the course: Learning Gradle
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Challenge: Define and execute a task
(upbeat music) - [Instructor] In this chapter we learned how to create and to execute tasks. It is time to write tasks of our own. For this challenge, I want you to implement an archiving task, named Tar text files, that creates a TAR file. The contents of the archive should only include the files with the file extension .txt. Text files should be stored in the directory texts inside of the archive. During the process of copying the files into the archive, we'll want to rename the file extension of the text files, to .text. The created TAR file, should end up in the output directory build/distributions. Make sure to compress the archive using Gzip. Contact the greater documentation to understand the API for creating such a task. I also want you to become more familiar with defining task actions, and tasks dependencies. Define a task action, that should print the message, creating TAR file, before the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Build files and conventions4m 29s
-
(Locked)
Defining and configuring a task5m 28s
-
(Locked)
The directed acyclic graph (DAG)2m 44s
-
(Locked)
Build lifecycle phases2m 41s
-
(Locked)
Applying reusable functionality with plugins3m 20s
-
(Locked)
Domain object runtime representation2m 44s
-
(Locked)
Referencing the documentation2m 30s
-
(Locked)
Challenge: Define and execute a task1m 29s
-
(Locked)
Solution: Define and execute a task7m 55s
-
(Locked)
-