-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
152 lines (129 loc) · 3.87 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
subprojects {
apply plugin: 'java'
apply plugin: 'checkstyle'
apply plugin: 'jacoco'
repositories {
mavenCentral()
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
}
compileJava {
options.compilerArgs << "-Xlint:all" << "-Werror"
}
compileTestJava {
options.compilerArgs << "-Xlint:all" << "-Xlint:-processing" << "-Werror"
}
plugins.withType(JavaPlugin) {
checkstyle.sourceSets = [sourceSets.main]
}
test {
maxParallelForks = 2
jacoco {
excludes = ['**/package-info**','**/*Test']
destinationFile = file("$buildDir/reports/jacoco/test.exec")
}
getReports().getJunitXml().setDestination(file("$buildDir/reports/tests/xml"))
getReports().getHtml().setDestination(file("$buildDir/reports/tests/html"))
setBinaryResultsDirectory(file("$buildDir/reports/tests/bin"))
}
test.finalizedBy("jacocoTestReport")
jacocoTestReport {
reports {
csv.required = false
xml.required = true
xml.destination = file("$buildDir/reports/jacoco/jacoco.xml")
html.required = true
html.destination = file("$buildDir/reports/jacoco/html")
}
doLast {
println "Test results available at:"
println "html - $buildDir/reports/tests/html/index.html"
println "Test coverage reports available at:"
println "html - $buildDir/reports/jacoco/html/index.html"
}
}
jar {
manifest {
attributes 'Implementation-Title': 'auroraArc', 'Implementation-Version': archiveVersion
}
}
javadoc {
source = sourceSets.main.allJava
options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PUBLIC
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from 'build/docs/javadoc'
}
task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}
task copyLibs(type: Copy) {
into "$buildDir/dependencies/"
from configurations.testRuntimeClasspath
}
build.finalizedBy("copyLibs")
artifacts {
archives jar
archives javadocJar
archives sourcesJar
}
}
project(':arcCommon') {
archivesBaseName = 'arcCommon'
dependencies {
testImplementation (
"org.threadly:threadly-test:$threadlyTestVersion",
"junit:junit:$junitVersion",
"org.mockito:mockito-core:$mockitoVersion",
"org.openjdk.jmh:jmh-core:$jmhVersion",
"org.openjdk.jmh:jmh-generator-annprocess:$jmhVersion",
"org.jdbi:jdbi3-core:$jdbiVersion",
"org.jdbi:jdbi3-sqlobject:$jdbiVersion",
"com.zaxxer:HikariCP:$hikariVersion",
"ch.qos.logback:logback-core:$logbackVersion",
"ch.qos.logback:logback-classic:$logbackVersion"
)
testAnnotationProcessor "org.openjdk.jmh:jmh-generator-annprocess:$jmhVersion"
implementation (
"org.threadly:threadly:$threadlyVersion"
)
}
}
project(':mysqlAuroraArc') {
archivesBaseName = 'auroraArc-mysql'
dependencies {
testImplementation (
project(':arcCommon').sourceSets.test.output,
"junit:junit:$junitVersion",
"org.mockito:mockito-core:$mockitoVersion",
"org.jdbi:jdbi3-core:$jdbiVersion",
"org.jdbi:jdbi3-sqlobject:$jdbiVersion",
"com.zaxxer:HikariCP:$hikariVersion",
"ch.qos.logback:logback-core:$logbackVersion",
"ch.qos.logback:logback-classic:$logbackVersion"
)
implementation (
project(":arcCommon"),
"org.threadly:threadly:$threadlyVersion",
"mysql:mysql-connector-java:$mysqlVersion"
)
}
}
project(':psqlAuroraArc') {
archivesBaseName = 'auroraArc-psql'
dependencies {
testImplementation (
project(':arcCommon').sourceSets.test.output,
"junit:junit:$junitVersion",
"org.mockito:mockito-core:$mockitoVersion"
)
implementation (
project(":arcCommon"),
"org.threadly:threadly:$threadlyVersion",
"org.postgresql:postgresql:$psqlVersion"
)
}
}