Gradle Tutorial
Introduction Installation Creating project using command line Simple gradle project in IntelliJ IDEA build.gradle file settings.gradle file Directory structure of Gradle project Built-in tasks User defined tasks Task dependencies Running gradle tasks Grouping tasks Repository management in Gradle Declaring dependencies in Gradle JUnit TestNG Test execution reports in Gradle Creating executable Jar using Gradle Generating project API documentation in Gradle Publishing and deployment of artifact in GradleTask dependencies in gradle
Gradle allows you to specify the dependencies between tasks. In below example , we have got 2 tasks – task1 and task2. If we execute task2, task1 will be executed as well as we have specified that task2 depends on task1
task task1;
task1 <<{
println “This block will be executed after doLast block of task1”
}
task task2 (dependsOn:task1) << {
println “Declaring and defining new task at the same time”
}
We can also specify the dependencies using below syntax.
task2.dependsOn(testClasses)
Web development and Automation testing
solutions delivered!!