forked from odpi/egeria
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
528 lines (491 loc) · 24.7 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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
/*
* SPDX-License-Identifier: Apache-2.0
* Copyright Contributors to the ODPi Egeria project.
*/
/*
* Plugins for this parent module only - so just high level project related
*/
plugins {
id "io.freefair.aggregate-javadoc" version "6.6.3"
id "io.freefair.lombok" version "6.6.3"
// Checks for unnecessary dependencies
id 'com.autonomousapps.dependency-analysis' version "1.19.0"
// helps resolve log implementation clashes
id 'dev.jacomet.logging-capabilities' version "0.11.0"
// This plugin helps resolve jakarta/javax dev.jacomet.logging-capabilities
id 'org.gradlex.java-ecosystem-capabilities' version "1.1"
}
/*
* Configuration for all projects - INCLUDING this one
*/
allprojects {
group = 'org.odpi.egeria'
version = '4.0-SNAPSHOT'
// Mostly java, so default to this for now
apply plugin: 'java'
apply plugin: 'jacoco'
apply plugin: 'org.gradlex.java-ecosystem-capabilities'
apply plugin: 'dev.jacomet.logging-capabilities'
// As we've migrated from maven - we'll assume all submodules publish directly to maven
apply plugin: 'maven-publish'
// Only use maven central
repositories {
mavenCentral()
// used by tink (encrypted filestore connector)
google()
}
// ensures we pick up the very latest snapshots when built
configurations.all {
// check for updates every build
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
/*
* Dependency Management - to fix versions. Pick up maven build settings for now
*/
// Assign variables for any constraints
ext {
lombokVersion= '1.18.26'
antlrVersion = '3.5.3'
ST4Version = '4.3.4'
avroVersion = '1.11.1'
classgraphVersion = '4.8.155'
classmateVersion = '1.5.1'
collections4Version = '4.4'
commonscodecVersion = '1.15'
commonsconfiguration2Version = '2.8.0'
commonsconfigurationVersion = '1.10'
commonsioVersion = '2.11.0'
commonsloggingVersion = '1.2'
commonstextVersion = '1.10.0'
commonscliVersion = '1.5.0'
elasticsearchVersion = '8.6.2'
findbugsVersion = '3.0.2'
glassfishVersion = '1.1.4'
gremlinVersion = '3.5.5'
groovyVersion = '3.0.13'
guavaVersion = '31.1-jre'
hamcrestVersion = '2.2'
hdrhistogramVersion = '2.1.12'
hibernatevalidatorVersion = '8.0.0.Final'
httpclientVersion = '4.5.14'
httpcoreVersion = '4.4.16'
jacksonVersion = '2.14.1'
jacksonDatabindVersion = '2.14.2'
jacksonaslVersion = '1.9.14-atlassian-6'
jakartaannotationVersion = '2.1.1'
jakartapersistenceVersion = '3.1.0'
jakartavalidationVersion = '3.0.2'
janusVersion = '0.6.1'
javassistVersion = '3.29.2-GA'
jaxbVersion = '2.3.1'
jenaVersion = '4.2.0'
jodatimeVersion = '2.12.2'
jsonldVersion = '0.13.4'
junitVersion = '4.13.2'
junitjupiterVersion = '5.9.2'
junitplatformVersion = '1.9.1'
jwtVersion = '0.9.1'
jwtApiVersion = '0.11.5'
jwtImplVersion = '0.11.5'
jwtJacksonVersion = '0.11.5'
kafkaVersion = '3.4.0'
lang3Version = '3.12.0'
logbackVersion = '1.2.11'
lettuceVersion = '6.2.3.RELEASE'
luceneVersion = '8.11.1'
openlineageVersion = '0.20.6'
ossVersion = '4.15.0'
mockitoVersion = '4.11.0'
plexusVersion = '3.5.0'
prometheusVersion = '1.10.4'
nettyVersion = '4.1.89.Final'
quartzVersion = '2.3.2'
reflectionsVersion = '0.10.2'
sanitizerVersion = '1.2.3'
servletVersion = '4.0.1'
sleepycatVersion = '18.3.12'
snakeyamlVersion = '1.33'
slf4jVersion = '1.7.36'
snappyVersion = '1.1.9.1'
springdocVersion = '1.6.13'
springbootVersion = '2.7.9'
spotbugsVersion = '4.7.3'
springdataVersion = '2.7.8'
springldapVersion = '2.4.1'
springsecurityVersion = '5.8.2'
swaggerVersion = '2.2.8'
testngVersion = '7.7.1'
thriftVersion = '0.18.0'
springwebVersion = '5.3.25'
tinkVersion = '1.8.0'
tomcatVersion = '9.0.72'
validationVersion = '2.0.1.Final'
gsonVersion = '2.10.1'
antVersion = '1.10.13'
jnrVersion = '3.1.16'
cassandraVersion = '4.1.0'
protobufVersion = '3.22.0'
osgiVersion = '8.0.0'
log4jVersion = '2.20.0'
jacksonjdk8Version = '2.14.2'
reactivestreamsVersion = '1.0.4'
}
dependencies {
constraints {
implementation("ch.qos.logback:logback-classic:${logbackVersion}")
implementation("ch.qos.logback:logback-core:${logbackVersion}")
implementation("com.datastax.oss:java-driver-core:${ossVersion}")
implementation("com.fasterxml.jackson.core:jackson-databind:${jacksonDatabindVersion}")
implementation("com.fasterxml.jackson.core:jackson-annotations:${jacksonVersion}")
implementation("com.fasterxml.jackson.core:jackson-core:${jacksonVersion}")
implementation("com.fasterxml.jackson.core:jackson-datatype-jsr310:${jacksonVersion}")
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:${jacksonVersion}")
implementation("com.fasterxml:classmate:${classmateVersion}")
implementation("com.github.jsonld-java:jsonld-java:${jsonldVersion}")
implementation("com.google.crypto.tink:tink:${tinkVersion}")
implementation("com.github.spotbugs:spotbugs-annotations:${spotbugsVersion}")
implementation("com.google.code.findbugs:jsr305:${findbugsVersion}")
implementation("com.google.guava:guava:${guavaVersion}")
implementation("com.mikesamuel:json-sanitizer:${sanitizerVersion}")
implementation("com.sleepycat:je:${sleepycatVersion}")
implementation("commons-codec:commons-codec:${commonscodecVersion}")
implementation("commons-io:commons-io:${commonsioVersion}")
implementation("commons-cli:commons-cli:${commonscliVersion}")
implementation("commons-logging:commons-logging:${commonsloggingVersion}")
implementation("org.apache.commons:commons-text:${commonstextVersion}")
implementation("io.github.classgraph:classgraph:${classgraphVersion}")
implementation("io.jsonwebtoken:jjwt:${jwtVersion}")
implementation("io.jsonwebtoken:jjwt-api:${jwtApiVersion}")
implementation("io.lettuce:lettuce-core:${lettuceVersion}")
implementation("io.micrometer:micrometer-registry-prometheus:${prometheusVersion}")
implementation("io.netty:netty-handler:${nettyVersion}")
implementation("io.netty:netty-common:${nettyVersion}")
implementation("io.netty:netty-buffer:${nettyVersion}")
implementation("io.netty:netty-codec:${nettyVersion}")
implementation("io.netty:netty-all:${nettyVersion}")
implementation("io.netty:netty-transport:${nettyVersion}")
implementation("io.netty:netty-resolver:${nettyVersion}")
implementation("io.swagger.core.v3:swagger-annotations:${swaggerVersion}")
implementation("io.openlineage:openlineage-java:${openlineageVersion}")
implementation("jakarta.persistence:jakarta.persistence-api:${jakartapersistenceVersion}")
implementation("jakarta.validation:jakarta.validation-api:${jakartavalidationVersion}")
implementation("javax.validation:validation-api:${validationVersion}")
implementation("javax.xml.bind:jaxb-api:${jaxbVersion}")
implementation("org.apache.avro:avro:${avroVersion}")
implementation("org.apache.commons:commons-collections4:${collections4Version}")
implementation("org.apache.commons:commons-lang3:${lang3Version}")
implementation("org.apache.httpcomponents:httpclient:${httpclientVersion}")
implementation("org.apache.httpcomponents:httpcore:${httpcoreVersion}")
implementation("org.apache.httpcomponents:httpcore-nio:${httpcoreVersion}")
implementation("org.apache.httpcomponents:httpcore-osgi:${httpcoreVersion}")
implementation("org.apache.jena:jena-core:${jenaVersion}")
implementation("org.apache.kafka:kafka-clients:${kafkaVersion}")
implementation("org.apache.lucene:lucene-core:${luceneVersion}")
implementation("org.apache.lucene:lucene-analyzers-common:${luceneVersion}")
implementation("org.apache.lucene:lucene-queryparser:${luceneVersion}")
implementation("org.apache.lucene:lucene-spatial:${luceneVersion}")
implementation("org.apache.lucene:lucene-spatial-extras:${luceneVersion}")
implementation("org.apache.tinkerpop:tinkergraph-gremlin:${gremlinVersion}")
implementation("org.apache.tinkerpop:gremlin-driver:${gremlinVersion}")
implementation("org.apache.tinkerpop:gremlin-core:${gremlinVersion}")
implementation("org.apache.tinkerpop:gremlin-groovy:${gremlinVersion}")
implementation("org.apache.tinkerpop:gremlin-shaded:${gremlinVersion}")
implementation("org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}")
//TODO May need to exclude tomcat-annotations-api
implementation("org.apache.tomcat:tomcat-coyote:${tomcatVersion}")
//TODO May need to exclude tomcat-annotations-api
implementation("org.codehaus.groovy:groovy:${groovyVersion}")
implementation("org.codehaus.groovy:groovy-cli-picocli:${groovyVersion}")
implementation("org.codehaus.groovy:groovy-console:${groovyVersion}")
implementation("org.codehaus.groovy:groovy-jsr223:${groovyVersion}")
implementation("org.codehaus.groovy:groovy-templates:${groovyVersion}")
implementation("org.codehaus.groovy:groovysh:${groovyVersion}")
compileOnly("org.elasticsearch:elasticsearch:${elasticsearchVersion}")
implementation("org.elasticsearch.client:elasticsearch-rest-client:${elasticsearchVersion}")
implementation("co.elastic.clients:elasticsearch-java:${elasticsearchVersion}")
implementation("org.codehaus.plexus:plexus-utils:${plexusVersion}")
implementation("org.hdrhistogram:HdrHistogram:${hdrhistogramVersion}")
implementation("org.janusgraph:janusgraph-core:${janusVersion}")
implementation("org.janusgraph:janusgraph-inmemory:${janusVersion}")
implementation("org.janusgraph:janusgraph-driver:${janusVersion}")
implementation("org.javassist:${javassistVersion}")
implementation("org.quartz-scheduler:quartz:${quartzVersion}")
implementation("org.reflections:reflections:${reflectionsVersion}")
implementation("org.springdoc:springdoc-openapi-ui:${springdocVersion}")
implementation("org.slf4j:jcl-over-slf4j:${slf4jVersion}")
implementation("org.slf4j:slf4j-api:${slf4jVersion}")
implementation("org.springframework.boot:spring-boot-autoconfigure:${springbootVersion}")
implementation("org.springframework.boot:spring-boot:${springbootVersion}")
implementation("org.springframework.boot:spring-boot-starter-web:${springbootVersion}")
implementation("org.springframework.boot:spring-boot-starter-validation:${springbootVersion}")
implementation("org.springframework.data:spring-data-commons:${springdataVersion}")
implementation("org.springframework.boot:spring-boot-test:${springbootVersion}")
implementation("org.springframework.boot:spring-boot-starter-test:${springbootVersion}")
implementation("org.springframework.boot:spring-boot-starter-security:${springbootVersion}")
implementation("org.springframework.boot:spring-boot-starter-data-redis:${springbootVersion}")
implementation("org.springframework.boot:spring-boot-starter-actuator:${springbootVersion}")
implementation("org.springframework.security:spring-security-config:${springsecurityVersion}")
implementation("org.springframework.security:spring-security-core:${springsecurityVersion}")
implementation("org.springframework.security:spring-security-ldap:${springsecurityVersion}")
implementation("org.springframework.security:spring-security-web:${springsecurityVersion}")
implementation("org.springframework:spring-aop:${springwebVersion}")
implementation("org.springframework:spring-beans:${springwebVersion}")
implementation("org.springframework:spring-context:${springwebVersion}")
implementation("org.springframework:spring-expression:${springwebVersion}")
implementation("org.springframework:spring-test:${springwebVersion}")
implementation("org.springframework:spring-jdbc:${springwebVersion}")
implementation("org.springframework:spring-web:${springwebVersion}")
implementation("org.springframework:spring-webmvc:${springwebVersion}")
implementation("org.springframework:spring-tx:${springwebVersion}")
implementation("org.springframework:spring-core:${springwebVersion}")
implementation("org.springframework.ldap:ldap-core:${springldapVersion}")
implementation("javax.servlet:javax.servlet-api:${servletVersion}")
implementation("commons-configuration:commons-configuration:${commonsconfigurationVersion}")
implementation("org.apache.commons:commons-configuration2:${commonsconfiguration2Version}")
implementation("org.hibernate:hibernate-validator:${hibernatevalidatorVersion}")
implementation("org.apache.thrift:libthrift:${thriftVersion}")
implementation("org.apache.cassandra:cassandra-all:${cassandraVersion}")
implementation("org.apache.ant:ant:${antVersion}")
implementation("com.google.protobuf:protobuf-java:${protobufVersion}")
implementation("com.google.code.gson:gson:${gsonVersion}")
implementation("com.github.jnr:jnr-posix:${jnrVersion}")
implementation("org.osgi:org.osgi.core:${osgiVersion}")
implementation("org.apache.logging.log4j:log4j-api:${log4jVersion}")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jdk8:${jacksonjdk8Version}")
implementation("org.reactivestreams:reactive-streams:${reactivestreamsVersion}")
annotationProcessor("org.projectlombok:lombok:${lombokVersion}")
implementation("org.projectlombok:lombok:${lombokVersion}")
// testng also used in our 'source' code to support unit tests
implementation("org.testng:testng:${testngVersion}")
runtimeOnly("joda-time:joda-time:${jodatimeVersion}")
implementation("org.yaml:snakeyaml:${snakeyamlVersion}")
runtimeOnly("org.antlr:antlr-runtime:${antlrVersion}")
runtimeOnly("org.antlr:ST4:${ST4Version}")
runtimeOnly("org.apache.jena:jena-arq:${jenaVersion}")
runtimeOnly("org.codehaus.jackson:jackson-mapper-asl:${jacksonaslVersion}")
runtimeOnly("org.codehaus.jackson:jackson-core-asl:${jacksonaslVersion}")
runtimeOnly("org.janusgraph:janusgraph-berkeleyje:${janusVersion}")
runtimeOnly("org.janusgraph:janusgraph-cql:${janusVersion}")
runtimeOnly("org.janusgraph:janusgraph-lucene:${janusVersion}")
runtimeOnly("org.xerial.snappy:snappy-java:${snappyVersion}")
runtimeOnly("org.janusgraph:janusgraph-es:${janusVersion}")
runtimeOnly("org.xerial.snappy:snappy-java:${snappyVersion}")
runtimeOnly("javax.servlet:javax.servlet-api:${servletVersion}")
runtimeOnly("io.jsonwebtoken:jjwt-impl:${jwtImplVersion}")
runtimeOnly("io.jsonwebtoken:jjwt-jackson:${jwtJacksonVersion}")
testImplementation("junit:junit:${junitVersion}")
testImplementation("org.glassfish:javax.json:${glassfishVersion}")
testImplementation("org.junit.jupiter:junit-jupiter:${junitjupiterVersion}")
testImplementation("org.junit.jupiter:junit-jupiter-api:${junitjupiterVersion}")
testImplementation("org.junit.jupiter:junit-jupiter-engine:${junitjupiterVersion}")
testImplementation("org.junit.jupiter:junit-platform-runner:${junitplatformVersion}")
testImplementation("org.junit.jupiter:junit-platform-suite-api:${junitplatformVersion}")
testImplementation("org.junit.vintage:junit-vintage-engine:${junitplatformVersion}")
testImplementation("org.mockito:mockito-core:${mockitoVersion}")
testImplementation("org.mockito:mockito-junit-jupiter:${mockitoVersion}")
testImplementation("org.mockito:mockito-inline:${mockitoVersion}")
testImplementation("org.slf4j:slf4j-simple:${slf4jVersion}")
testImplementation("org.testng:testng:${testngVersion}")
testImplementation("org.hamcrest:hamcrest:${hamcrestVersion}")
// Explicitly enforced versions of transitive dependencies to mitigate potential CVEs reported by static security scans.
//TODO: Remove dependency line below in case the new parent library is updated and pulls good version.
runtimeOnly("com.beust:jcommander:1.82")
runtimeOnly("org.antlr:antlr4:4.12.0")
runtimeOnly("org.apache.ivy:ivy:2.5.1")
}
implementation platform('net.openhft:chronicle-bom:2.24ea43')
modules {
module('org.glassfish:jakarta.json') {
replacedBy 'jakarta.json:jakarta.json-api', 'use jakarta.json.api instead of glassfish'
}
}
}
// we already have bridge modules that implement commons logging, so cannot have another implementation in classpath
// we also want to avoid the glassfish implementation of jakarta.json (if we have to, will replace as above)
configurations {
all {
exclude module: 'commons-logging'
exclude module: 'org.glassfish:jakarta.json'
}
}
/*
* Java related configuration
*/
java {
withSourcesJar()
withJavadocJar()
}
tasks.withType(JavaCompile) {
options.release = 17
options.encoding = 'UTF-8'
options.incremental = true
options.failOnError = true
options.compilerArgs << "-Xlint:all"
}
// javadoc
javadoc {
options.addBooleanOption('html5', true)
}
// code coverage
jacoco {
toolVersion = "0.8.8"
}
// lombok
lombok {
version = "${lombokVersion}"
}
/*
* Publishing of maven artifacts -- and signing (only for CI)
*/
apply plugin: 'signing'
publishing {
publications {
mavenmodule(MavenPublication) {
from components.java
pom {
url = 'http://egeria.odpi.org'
licenses {
// Code
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
// Docs
license {
name = 'Creative Commons Attribution 4.0 International (CC BY 4.0)'
url = 'https://creativecommons.org/licenses/by/4.0'
}
}
developers {
developer {
id = 'planetf1'
name = 'Nigel Jones'
email = 'nigel.l.jones+git@gmail.com'
}
}
scm {
connection = 'scm:git:git://github.com/odpi/egeria.git'
developerConnection = 'scm:git:ssh://github.com/odpi/egeria/egeria.git'
url = 'http://github.com/odpi/egeria'
}
}
// Override the project name & description for the pom based on properties set in the child build.gradle (hard to default & required for maven central)
pom.withXml {
asNode().appendNode('name', "${project.name}")
asNode().appendNode('description', "${project.description}")
}
}
}
// Release versions get pushed to staging area on maven central, snapshots to snapshot repo
// Secrets for credentials
repositories {
maven {
name = 'OSSRH'
def releasesRepoUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2'
def snapshotsRepoUrl = 'https://oss.sonatype.org/content/repositories/snapshots'
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
// User token (under profile) on oss.sonatype.org
credentials {
username = System.getenv("OSSRH_USERNAME")
password = System.getenv("OSSRH_TOKEN")
}
}
}
}
/*
* Additional useful tasks
*/
task printAllDependencies(type: DependencyReportTask) {}
task printSubDependencies(type: DependencyReportTask) {}
task findDependency(type: DependencyInsightReportTask) {}
} // end of allProjects
// Whilst all modules have their own javadoc, we only build
// an aggregate for the client and API modules plus the REST calls
javadoc {
include("**/api/*.java")
include("**/client/*.java")
include("**/clients/*.java")
include("**/properties/*.java")
include("**/metadataelements/*.java")
include("**/metadataelement/*.java")
include("**/events/*.java")
include("**/rest/*.java")
include("**/exceptions/*.java")
include("**/beans/*.java")
include("**/ffdc/*.java")
include("**/configuration/*.java")
include("**/configuration/registration/*.java")
include("**/store/*.java")
include("**/connectors/*.java")
include("**/adminservices/*.java")
include("**/connector/*.java")
include("**/frameworks/*.java")
include("**/context/*.java")
include("**/contextmanager/*.java")
include("**/graph/*.java")
include("**/model/*.java")
include("**/auditlog/*.java")
include("**/omrstopic/*.java")
include("**/openmetadatatopic/*.java")
include("**/archivestore/*.java")
include("**/auditlogstore/*.java")
include("**/cohortregistrystore/*.java")
include("**/repositoryconnector/*.java")
include("**/repositoryeventmapper/*.java")
include("**/metadatacollectionstore/*.java")
include("**/metadatacollectionstore/properties/instances/*.java")
include("**/metadatacollectionstore/properties/typedefs/*.java")
include("**/metadatacollectionstore/properties/search/*.java")
include("**/metadatacollectionstore/utilities/*.java")
include("**/archiveutilities/*.java")
include("**/metadatasecurity/*.java")
include("**/spring/*.java")
include("**/frameworks/**/*.java")
}
/*
* Configuration for sub projects only
*/
subprojects {
// All tasks currently will run under allProjects - which includes root.
}
/*
* Additional aggregate tasks run only at parent
*/
// Jacoco reporting -- from gradle docs
task codeCoverageReport(type: JacocoReport) {
// Gather execution data from all subprojects
executionData fileTree(project.rootDir.absolutePath).include("**/build/jacoco/*.exec")
// Add all relevant sourcesets from the subprojects
subprojects.each {
sourceSets it.sourceSets.main
}
// enable the different report types (html, xml, csv)
reports {
// xml is usually used to integrate code coverage with
// other tools like SonarQube, Coveralls or Codecov
xml.required = true
// HTML reports can be used to see code coverage
// without any external tools
html.required = true
csv.required = true
}
}
// always run the tests before generating the report
codeCoverageReport.dependsOn {
subprojects*.test
}
// Dependency checking - see https://github.com/autonomousapps/dependency-analysis-android-gradle-plugin
dependencyAnalysis {
issues {
all {
onAny {
severity('fail')
}
onUnusedDependencies {
exclude("junit:junit", "org.junit.jupiter:junit-jupiter-api", "org.junit.jupiter:junit-jupiter-engine", "com.fasterxml.jackson.core:jackson-annotations")
}
}
}
}
// Always run dependency check for every regular build
build.dependsOn("buildHealth")