forked from HubTurbo/HubTurbo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
163 lines (136 loc) · 4.55 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
/*
* Gradle Configuration File
*
* For more details take a look at the Java Quickstart chapter in the Gradle
* user guide available at http://gradle.org/docs/2.2.1/userguide/tutorial_java_projects.html
*/
// Plugins
plugins {
id "com.github.kt3k.coveralls" version "2.4.0"
id "com.github.johnrengelman.shadow" version "1.2.1"
}
allprojects {
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'maven'
apply plugin: 'jacoco'
apply plugin: 'checkstyle'
checkstyle {
toolVersion = "6.7"
}
apply plugin: 'findbugs'
apply plugin: 'java'
// TODO: add group here (e.g. group = 'sg.edu.nus.comp.hubturbo')
version = '3.2.0'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
repositories {
jcenter()
mavenCentral()
maven {
url "https://repo.eclipse.org/content/repositories/egit-releases/"
}
}
project.ext {
log4jVersion = '2.3'
controlsfxVersion = '8.40.9'
gsonVersion = '2.3.1'
guavaVersion = '18.0'
jnaVersion = '4.1.0'
markdown4jVersion = '2.2-cj-1.0'
openjfxDialogsVersion = '1.0.3'
egitVersion = '4.0.1.201506240215-r'
prettytimeVersion = '4.0.0.Final'
seleniumJavaVersion = '2.46.0'
seleniumServerVersion = '2.46.0'
junitVersion = '4.12'
testFxVersion = '3.1.0'
}
dependencies {
compile "org.apache.logging.log4j:log4j-api:$log4jVersion"
compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
compile "org.controlsfx:controlsfx:$controlsfxVersion"
compile "com.google.code.gson:gson:$gsonVersion"
compile "com.google.guava:guava:$guavaVersion"
compile "net.java.dev.jna:jna:$jnaVersion"
compile "org.commonjava.googlecode.markdown4j:markdown4j:$markdown4jVersion"
compile "org.controlsfx:openjfx-dialogs:$openjfxDialogsVersion"
compile "org.eclipse.mylyn.github:org.eclipse.egit.github.core:$egitVersion"
compile "org.ocpsoft.prettytime:prettytime:$prettytimeVersion"
compile "org.seleniumhq.selenium:selenium-java:$seleniumJavaVersion"
compile "org.seleniumhq.selenium:selenium-server:$seleniumServerVersion"
testCompile "junit:junit:$junitVersion"
testCompile "org.loadui:testFx:$testFxVersion"
}
test {
forkEvery = 1
// uncomment to disable gui tests
// exclude 'guitests'
}
jacoco {
toolVersion = "0.7.5.201505241946"
}
jacocoTestReport {
dependsOn test
sourceDirectories = project.files(sourceSets.main.allSource.srcDirs)
classDirectories = project.files(sourceSets.main.output)
afterEvaluate {
classDirectories = files(classDirectories.files.collect {
fileTree(dir: it, exclude: 'tests/**')
})
}
reports {
xml.enabled = true
html.enabled = true
}
}
jar {
manifest {
attributes 'Main-Class': 'ui.UI'
}
}
assemble.dependsOn shadowJar
}
task checkstyleHtml << {
ant.xslt(in: checkstyleMain.reports.xml.destination,
style: file('config/checkstyle/checkstyle-noframes-sorted.xsl'),
out: new File(checkstyleMain.reports.xml.destination.parent, 'main.html'))
}
checkstyleMain.finalizedBy checkstyleHtml
tasks.withType(FindBugs) {
reports {
xml.enabled = false
html.enabled = true
}
}
findbugs {
excludeFilter = file("${projectDir}/config/findbugs/excludeFilter.xml")
}
task jacocoRootReport(type: JacocoReport) {
dependsOn = allprojects.test
sourceDirectories = files(allprojects.sourceSets.main.allSource.srcDirs)
classDirectories = files(allprojects.sourceSets.main.output)
executionData = files(allprojects.jacocoTestReport.executionData)
afterEvaluate {
classDirectories = files(classDirectories.files.collect {
fileTree(dir: it, exclude: ['github/**', 'backend/github/**'])
})
}
reports {
html.enabled = true
xml.enabled = true
}
}
coveralls {
sourceDirs = allprojects.sourceSets.main.allSource.srcDirs.flatten()
jacocoReportPath = "${buildDir}/reports/jacoco/jacocoRootReport/jacocoRootReport.xml"
}
tasks.coveralls {
group = 'Coverage reports'
description = 'Uploads the aggregated coverage report to Coveralls'
dependsOn jacocoRootReport
onlyIf { System.env.'CI' }
}
task wrapper(type: Wrapper) {
gradleVersion = '2.4' //version required
}