-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
123 lines (110 loc) · 4.5 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
import java.text.SimpleDateFormat
buildscript {
repositories {
google()
}
}
subprojects {
apply plugin: 'java-library'
group = 'com.arthenica'
version = '0.2.1'
task sourcesJar(type: Jar) {
archiveClassifier.set('sources')
from sourceSets.main.java.srcDirs
manifest {
attributes(
'Built-By': System.getProperty('user.name'),
'Build-Timestamp': new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSSZ").format(new Date()),
'Created-By': "Gradle ${gradle.gradleVersion}",
'Build-Jdk': System.getProperty('java.version'),
'Implementation-Version': archiveVersion
)
}
}
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier.set('javadoc')
from javadoc.destinationDir
manifest {
attributes(
'Built-By': System.getProperty('user.name'),
'Build-Timestamp': new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSSZ").format(new Date()),
'Created-By': "Gradle ${gradle.gradleVersion}",
'Build-Jdk': System.getProperty('java.version'),
'Implementation-Version': archiveVersion
)
}
}
java {
withSourcesJar()
withJavadocJar()
}
jar {
buildDir = 'target'
manifest {
attributes(
'Built-By': System.getProperty('user.name'),
'Build-Timestamp': new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSSZ").format(new Date()),
'Created-By': "Gradle ${gradle.gradleVersion}",
'Build-Jdk': System.getProperty('java.version'),
'Implementation-Version': archiveVersion
)
}
}
test {
testLogging {
events "passed", "skipped", "failed"
showExceptions true
showCauses true
showStackTraces true
afterSuite { desc, result ->
if (!desc.parent) {
def output = "Results: ${result.resultType} (${result.testCount} tests, ${result.successfulTestCount} passed, ${result.failedTestCount} failed, ${result.skippedTestCount} skipped)"
def startItem = '| ', endItem = ' |'
def repeatLength = startItem.length() + output.length() + endItem.length()
println('\n' + ('-' * repeatLength) + '\n' + startItem + output + endItem + '\n' + ('-' * repeatLength))
}
}
}
}
ext {
cxfVersion = '3.4.5'
springBootVersion = '2.2.13.RELEASE'
mockitoVersion = '3.12.4'
slf4jVersion = '1.7.32'
logbackVersion = '1.2.7'
junitVersion = '4.13.2'
commonsCodecVersion = '1.15'
logstashLogbackEncoderVersion = '7.0.1'
// release properties
bintrayRepo = 'maven'
publishedGroupId = 'com.arthenica'
siteUrl = 'https://github.com/tanersener/smart-exception'
issueTrackerUrl = 'https://github.com/tanersener/smart-exception/issues'
gitUrl = 'https://github.com/tanersener/smart-exception.git'
developerId = 'tanersener'
developerName = 'Taner Sener'
developerEmail = 'tanersener@gmail.com'
licenseName = 'The 3-Clause BSD License'
licenseUrl = 'https://opensource.org/licenses/BSD-3-Clause'
allLicenses = ["BSD 3-Clause"]
}
dependencies {
testImplementation 'org.apache.cxf:cxf-rt-rs-client:' + cxfVersion
testImplementation 'org.apache.cxf:cxf-rt-transports-http-hc:' + cxfVersion
testImplementation('org.springframework.boot:spring-boot-starter-test:' + springBootVersion) {
exclude group: 'org.junit.jupiter', module: 'junit-jupiter'
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
exclude group: 'org.mockito', module: 'mockito-junit-jupiter'
}
testImplementation 'org.springframework.boot:spring-boot-starter-web:' + springBootVersion
testImplementation 'org.mockito:mockito-core:' + mockitoVersion
testImplementation 'org.slf4j:slf4j-api:' + slf4jVersion
testImplementation 'ch.qos.logback:logback-classic:' + logbackVersion
testImplementation 'junit:junit:' + junitVersion
testImplementation 'commons-codec:commons-codec:' + commonsCodecVersion
}
repositories {
mavenCentral()
mavenLocal()
}
}