-
Notifications
You must be signed in to change notification settings - Fork 120
/
build.gradle
127 lines (107 loc) · 3.26 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
apply plugin: 'java'
apply plugin: 'pmd'
repositories {
mavenCentral()
}
pmd {
toolVersion = '5.3.2'
ruleSets = []
ruleSetFiles = files('config/pmd/rulesets.xml')
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.5'
compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.5'
compile project(':jspeedtest')
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives javadocJar
archives sourcesJar
}
task findConventions << {
println project.getConvention()
}
task downloadFile(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
classpath += sourceSets.main.resources
main = "fr.bmartel.speedtest.examples.DownloadFileExample"
args ""
}
task downloadFTP(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
classpath += sourceSets.main.resources
main = "fr.bmartel.speedtest.examples.DownloadFtpExample"
args ""
}
task downloadFileProxy(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
classpath += sourceSets.main.resources
main = "fr.bmartel.speedtest.examples.DownloadFileProxyExample"
args ""
}
task uploadFile(type: JavaExec) {
classpath sourceSets.test.runtimeClasspath
main = "fr.bmartel.speedtest.examples.UploadFileExample"
args ""
}
task uploadFTP(type: JavaExec) {
classpath sourceSets.test.runtimeClasspath
main = "fr.bmartel.speedtest.examples.UploadFtpExample"
args ""
}
task fixedDownload(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
classpath += sourceSets.main.resources
main = "fr.bmartel.speedtest.examples.FixedTimeDownloadExample"
args ""
}
task fixedUpload(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
classpath += sourceSets.main.resources
main = "fr.bmartel.speedtest.examples.FixedTimeUploadExample"
args ""
}
task repeatDownload(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
classpath += sourceSets.main.resources
main = "fr.bmartel.speedtest.examples.RepeatDownloadExample"
args ""
}
task repeatUpload(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
classpath += sourceSets.main.resources
main = "fr.bmartel.speedtest.examples.RepeatUploadExample"
args ""
}
task repeatChain(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
classpath += sourceSets.main.resources
main = "fr.bmartel.speedtest.examples.ChainingRepeatExample"
args ""
}
task repeatChainFixed(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
classpath += sourceSets.main.resources
main = "fr.bmartel.speedtest.examples.ChainingFixedExample"
args ""
}
task generateJavadoc(type: Javadoc) {
source = sourceSets.main.allJava
classpath = configurations.compile
destinationDir = file("./doc/")
}
if (JavaVersion.current().isJava8Compatible()) {
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
}