-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
96 lines (80 loc) · 2.97 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
plugins {
id 'java'
id 'java-library'
id 'maven-publish'
}
group 'com.softwareverde'
version '3.3.5'
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
task makeJar(type: Jar) {
manifest {
attributes 'Implementation-Title': 'HTTP Server',
'Implementation-Version': archiveVersion
}
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
repositories {
mavenCentral()
maven { url "https://jitpack.io" }
}
dependencies {
// implementation fileTree(dir: 'libs', include: ['*.jar'])
compileOnly group: 'org.apache.tomcat', name: 'tomcat-servlet-api', version: '7.0.37'
api group: 'com.github.softwareverde', name: 'json', version: 'v2.0.4'
api group: 'com.github.softwareverde', name: 'java-http-client', version: 'v2.2.6'
implementation group: 'com.github.softwareverde', name: 'java-logging', version: 'v2.3.0'
implementation group: 'com.github.softwareverde', name: 'java-util', version: 'v2.9.2'
implementation group: 'com.github.softwareverde', name: 'java-cryptography', version: 'v3.2.1'
testImplementation group: 'junit', name: 'junit', version: '4.11'
}
tasks.withType(Test) {
testLogging {
// set options for log level LIFECYCLE
events "passed", "skipped", "failed", "standardOut"
showExceptions true
exceptionFormat "full"
showCauses true
showStackTraces true
// set options for log level DEBUG and INFO
debug {
events "started", "passed", "skipped", "failed", "standardOut", "standardError"
exceptionFormat "full"
}
info.events = debug.events
info.exceptionFormat = debug.exceptionFormat
afterSuite { desc, result ->
if (! desc.parent) { // will match the outermost suite
def output = "Results: ${result.resultType} (${result.testCount} tests, ${result.successfulTestCount} successes, ${result.failedTestCount} failures, ${result.skippedTestCount} skipped)"
def startItem = '| ', endItem = ' |'
def repeatLength = startItem.length() + output.length() + endItem.length()
println('\n' + ('-' * repeatLength) + '\n' + startItem + output + endItem + '\n' + ('-' * repeatLength))
}
}
}
}
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
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 sourcesJar
archives javadocJar
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
}