-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
91 lines (77 loc) · 2.46 KB
/
build.gradle
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
89
90
91
plugins {
id 'war'
id 'java'
id 'pmd'
id 'checkstyle'
id 'jacoco'
}
group 'net.novucs'
version '0.2.0'
def username = System.properties['user.name']
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
compile group: 'org.apache.derby', name: 'derbyclient', version: '10.14.2.0'
compile "com.stripe:stripe-java:15.4.0"
providedCompile group: 'javax', name: 'javaee-api', version: '7.0'
providedCompile group: 'jstl', name: 'jstl', version: '1.2'
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'org.apache.derby', name: 'derby', version: '10.14.2.0'
testCompile group: 'com.github.stefanbirkner', name: 'system-rules', version: '1.19.0'
testCompile group: 'org.mockito', name: 'mockito-all', version: '1.10.19'
testCompile group: 'javax.servlet', name: 'javax.servlet-api', version: '3.1.0'
testCompile group: 'org.glassfish', name: 'javax.json', version: '1.1.4'
}
task autodeploy(type: Copy) {
from war.archiveFile
into "build"
rename "esd-${project.version}.war", "app.war"
}
task windowsdeploy(type: Exec) {
commandLine 'windowsdeploy.bat'
}
windowsdeploy.dependsOn autodeploy
task netbeansdeploy(type: Copy) {
from war.archiveFile
// TODO: Change this glassfish installation location to whichever machine is
// performing the demo.
into "C:\\Users\\${username}.CAMPUS.000\\AppData\\Roaming\\Netbeans\\8.2\\config\\GF_4.1.1\\domain1\\autodeploy"
rename "esd-${project.version}.war", "app.war"
}
checkstyle {
toolVersion '8.24'
configFile file('config/checkstyle/checkstyle.xml')
}
pmd {
toolVersion '6.18.0'
ruleSets = []
ruleSetFiles = files("config/pmd/excludes.xml")
}
jacoco {
toolVersion = "0.8.4"
}
jacocoTestCoverageVerification {
violationRules {
rule {
limit {
minimum = 0.6
}
}
}
}
task coverage {
dependsOn 'jacocoTestReport'
dependsOn 'jacocoTestCoverageVerification'
tasks.findByName('jacocoTestCoverageVerification').mustRunAfter 'jacocoTestReport'
}
task checkBuildReport {
dependsOn 'check'
dependsOn 'jacocoTestReport'
dependsOn 'jacocoTestCoverageVerification'
dependsOn 'autodeploy'
tasks.findByName('jacocoTestReport').mustRunAfter 'check'
tasks.findByName('jacocoTestCoverageVerification').mustRunAfter 'jacocoTestReport'
tasks.findByName('autodeploy').mustRunAfter 'jacocoTestCoverageVerification'
}