In all my previous post under Gradle, I have executed a task by entering the below command in the command line. gradle taskName where taskName is the name of the task to be executed If we just type gradle, the output will be as shown below Output E:\Projects\GradleConcepts\package3>gradle Starting a Gradle Daemon, 1 incompatible Daemon…… Continue reading DefaultTask example
Category: Gradle
Excluding tasks from execution
In this post of Gradle, I will show how to exclude a particular task from execution. Below is the gradle script with three tasks build.gradle task task1 { doFirst { println ‘I am task1’ } } task task2 { doFirst { println ‘I am task2’ } } task task3 { doFirst { println ‘I am…… Continue reading Excluding tasks from execution
Executing multiple tasks
In this post of Gradle, I will show how to execute multiple tasks from command line. Below is the gradle script with three tasks build.gradle task task1 { doFirst { println ‘I am task1’ } } task task2 { doFirst { println ‘I am task2’ } } task task3 { doFirst { println ‘I am…… Continue reading Executing multiple tasks
Creating dependent tasks
In this post of gradle, I will show two different ways to make one task depend upon other. build.gradle 1 task task1 { 2 doFirst { 3 println ‘I am dependee’ 4 } 5 } 6 7 task task2(dependsOn: task1) { 8 doFirst { 9 println ‘I am dependent1’ 10 } 11 } 12 13…… Continue reading Creating dependent tasks
Creating and executing task
Gradle is domain specific language where the domain in this case is automating application build process. Gradle consists of Projects and Tasks. Each project has multiple Tasks and each Task has multiple actions. In this post I will explain how to create and execute task. Create a file by name build.gradle with the below code…… Continue reading Creating and executing task