-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuildTest.gradle
More file actions
88 lines (68 loc) · 1.52 KB
/
buildTest.gradle
File metadata and controls
88 lines (68 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
group 'com.krish.scala'
version '1.0-SNAPSHOT'
apply plugin: 'java'
sourceCompatibility = 1.5
def projectVersion=1.0
repositories {
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
}
task Hello{
doFirst{
println "Init Gradle"
}
doLast{
println "Hello Gralde"
}
}
task Hello1{
doFirst{
println "Init Gradle1"
}
doLast{
println "Hello Gralde1"
}
}
task wrapper(type:Wrapper){
gradleVersion = '3.0'
}
project.task("TestTask1")
task("TestTask2")
task "TestTask3"
task TestTask4
TestTask3 {println "Hello Bobby"}.description = "Test3 Desc"
task TestTask5{
description "This is Task5"
doLast{
println "Project version : $projectVersion"
println "$sourceCompatibility"
println "Holds the last step of Task5"
}
} dependsOn TestTask3, TestTask4
task TaskA << {println "This is TaskA"}
task TaskB << {println "This is TaskB"}
task TaskC << {println "This is TaskC"}
task TaskD << {println "This is TaskD"}
task TaskE << {println "This is TaskE"}
TaskA {}.dependsOn TaskB, TaskC, TaskD
TaskC {}.dependsOn TaskE
TaskD {}.dependsOn TaskE
//Switches the order
TaskC {}.mustRunAfter TaskD
TaskB {}.mustRunAfter TaskC
//Allows you to run for sure after the execution of task
TaskE {}.finalizedBy TaskC
task CpyTask(type:Copy){
from 'src'
into 'dummy'
}
task CnfCopy(type:Copy){
include "web.xml"
from 'src'
into 'dummy'
expand {
[resourceRefName:'jdbc/krishDB']
}
}