Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Gradle Essentials

You're reading from   Gradle Essentials Master the fundamentals of Gradle using real-world projects with this quick and easy-to-read guide

Arrow left icon
Product type Paperback
Published in Dec 2015
Publisher
ISBN-13 9781783982363
Length 176 pages
Edition 1st Edition
Tools
Arrow right icon
Authors (2):
Arrow left icon
Abhinandan Maheshwari Abhinandan Maheshwari
Author Profile Icon Abhinandan Maheshwari
Abhinandan Maheshwari
Kunal Dabir Kunal Dabir
Author Profile Icon Kunal Dabir
Kunal Dabir
Arrow right icon
View More author details
Toc

Build phases

A Gradle build follows a very simple life cycle on every invocation. The build passes through three stages: initialization, configuration, and execution. When a gradle command is invoked, not all the code written in our build file executes sequentially from top to bottom. Only the blocks of code that are relevant to the current phase of the build are executed. Also, the build phase's order determines when the block of code will execute. An example is the task configuration versus task execution. Understanding of these phases is important to correctly configure our build.

Initialization

Gradle first figures out whether the current project has child projects or if it is the only project in the build. For multiprojects build, Gradle figures out which projects (or sub-module, as many prefer to call them) have to be included in the build. We will see multiproject builds in the next chapter. Gradle then creates a Project instance for the root project and for each of the child...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime