-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
120 lines (101 loc) · 3.55 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
plugins {
id 'java-library'
id "org.sonarqube" version "4.0.0.2929"
}
sonarqube {
properties {
property "sonar.projectKey", "data-rocks-team_schemaregistry-junit"
property "sonar.organization", "data-rocks-team"
property "sonar.host.url", "https://sonarcloud.io"
property "sonar.scanner.force-deprecated-java-version-grace-period", "true"
property "sonar.coverage.exclusions", "**/schemaregistry-junit-test/**"
}
}
allprojects {
repositories {
jcenter()
// Add Confluent maven repo for Confluent dependencies
maven {
url "https://packages.confluent.io/maven/"
}
// Required for com.github.everit-org.json-schema:org.everit.json.schema:
maven {
url "https://jitpack.io"
}
}
}
ext {
apacheCuratorVersion = '5.2.0'
assertjVersion = '3.23.1'
confluentVersion = '7.3.3'
kafkaJunitVersion = '3.2.5'
jsonSchemaVersion = '1.12.1'
junit4Version = '4.13.2'
junitJupiterVersion = '5.8.2'
lombokVersion = '1.18.22'
protobufVersion = '3.22.2'
slf4jVersion = '1.7.33'
testcontainersVersion = '1.17.6'
}
subprojects {
// Every module is a Java library
apply plugin: 'java-library'
// Checkstyle
apply from: "$rootProject.projectDir/checkstyle.gradle"
// PMD
apply from: "$rootProject.projectDir/pmd.gradle"
// Specific Junit configuration
apply from: "$rootProject.projectDir/junit.gradle"
dependencies {
// Lombok configuration
compileOnly "org.projectlombok:lombok:$lombokVersion"
annotationProcessor "org.projectlombok:lombok:$lombokVersion"
testImplementation "org.projectlombok:lombok:$lombokVersion"
testAnnotationProcessor "org.projectlombok:lombok:$lombokVersion"
implementation "org.slf4j:slf4j-api:$slf4jVersion"
implementation "org.slf4j:slf4j-simple:$slf4jVersion"
testImplementation "org.assertj:assertj-core:$assertjVersion"
}
// Jacoco
apply from: "$rootProject.projectDir/jacoco.gradle"
// Keep Java8 compatibility
apply from: "$rootProject.projectDir/keep-java8-compatibility.gradle"
}
task setDependenciesForExample {
group 'Configure Example'
description 'Set dependencies for example using centralised ext variables'
doLast {
fileTree("examples")
.filter { it.isFile() }
.filter { it.name == 'build.gradle' }
.files
.path
.each {file ->
File buildGradle = new File(file)
String content = buildGradle.text
project.ext.properties
.each{ k, v ->
content = content.replaceAll("$k = 'PLACEHOLDER'", "$k = '$v'")}
buildGradle.write(content)
}
}
}
task setDependenciesForRegressionTesting {
group 'Configure Regression Testing'
description 'Set dependencies for regression testing using centralised ext variables'
doLast {
fileTree("regression-test")
.filter { it.isFile() }
.filter { it.name == 'build.gradle' }
.files
.path
.each {file ->
File buildGradle = new File(file)
String content = buildGradle.text
project.ext.properties
.each{ k, v ->
content = content.replaceAll("$k = 'PLACEHOLDER'", "$k = '$v'")}
buildGradle.write(content)
}
}
}