-
Notifications
You must be signed in to change notification settings - Fork 90
/
settings.gradle
134 lines (124 loc) · 6.29 KB
/
settings.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
pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
}
}
rootProject.name = 'kafka-tutorials'
import static groovy.io.FileType.DIRECTORIES
import static groovy.io.FileVisitResult.SKIP_SUBTREE
def getProjectName(String dir) {
return (dir - (rootDir.toString() + "/")).replaceAll("/", ":")
}
def skipDirs = ~/^(templates|build|…*|src|out)/
def preDir = {
if (skipDirs.matcher(it.name).matches()) {
return SKIP_SUBTREE
}
}
// dynamic project discovery won't work with dependabot
/*
rootDir.traverse(
type: DIRECTORIES,
preDir: preDir
) { dir ->
if (new File(dir, "build.gradle").exists()) {
include getProjectName(dir.toString())
}
}
*/
// <beginning> include projects
include '_includes:tutorials:aggregating-average:kstreams:code'
include '_includes:tutorials:aggregating-count:kstreams:code'
include '_includes:tutorials:aggregating-count:confluent:code'
include '_includes:tutorials:aggregating-minmax:kstreams:code'
include '_includes:tutorials:aggregating-sum:kstreams:code'
include '_includes:tutorials:aggregating-sum:confluent:code'
include '_includes:tutorials:cogrouping-streams:kstreams:code'
include '_includes:tutorials:cogrouping-streams:confluent:code'
include '_includes:tutorials:connect-add-key-to-source:kafka:code'
include '_includes:tutorials:connect-add-key-to-source:kstreams:code'
include '_includes:tutorials:console-consumer-primitive-keys-values:kafka:code'
include '_includes:tutorials:console-consumer-producer-basic:kafka:code'
include '_includes:tutorials:console-consumer-producer-basic:confluent:code'
include '_includes:tutorials:console-consumer-producer-avro:kafka:code'
include '_includes:tutorials:console-consumer-producer-avro:confluent:code'
include '_includes:tutorials:console-consumer-read-specific-offsets-partition:kafka:code'
include '_includes:tutorials:console-consumer-read-specific-offsets-partition:confluent:code'
include '_includes:tutorials:dynamic-output-topic:kstreams:code'
include '_includes:tutorials:dynamic-output-topic:confluent:code'
include '_includes:tutorials:filtering:kstreams:code'
include '_includes:tutorials:filtering:confluent:code'
include '_includes:tutorials:finding-distinct:kstreams:code'
include '_includes:tutorials:finding-distinct:confluent:code'
include '_includes:tutorials:fk-joins:kstreams:code'
include '_includes:tutorials:joining-stream-table:kstreams:code'
include '_includes:tutorials:joining-stream-table:confluent:code'
include '_includes:tutorials:kafka-connect-datagen:kafka:code'
include '_includes:tutorials:kafka-connect-datagen:confluent:code'
include '_includes:tutorials:kafka-consumer-application:kafka:code'
include '_includes:tutorials:kafka-consumer-application:confluent:code'
include '_includes:tutorials:kafka-producer-application:kafka:code'
include '_includes:tutorials:kafka-producer-application:confluent:code'
include '_includes:tutorials:kafka-producer-application-callback:kafka:code'
include '_includes:tutorials:kafka-producer-application-callback:confluent:code'
include '_includes:tutorials:merging:kstreams:code'
include '_includes:tutorials:merging:confluent:code'
include '_includes:tutorials:message-ordering:kafka:code'
include '_includes:tutorials:naming-changelog-repartition-topics:kstreams:code'
include '_includes:tutorials:optimize-producer-throughput:confluent:code'
include '_includes:tutorials:serialization:kstreams:code'
include '_includes:tutorials:splitting:kstreams:code'
include '_includes:tutorials:splitting:confluent:code'
//include '_includes:tutorials:spring-kafka-error-handling:kafka:code'
include '_includes:tutorials:streams-to-table:kstreams:code'
include '_includes:tutorials:streams-to-table:confluent:code'
include '_includes:tutorials:transforming:kafka:code'
include '_includes:tutorials:transforming:kstreams:code'
include '_includes:tutorials:transforming:confluent:code'
include '_includes:tutorials:tumbling-windows:kstreams:code'
include '_includes:tutorials:tumbling-windows:confluent:code'
// udf is an exception
include '_includes:tutorials:udf:ksql:code'
include '_includes:tutorials:window-final-result:kstreams:code'
include '_includes:tutorials:produce-consume-lang:scala:code'
include '_includes:tutorials:produce-consume-lang:scala:code:app-producer'
include '_includes:tutorials:produce-consume-lang:scala:code:app-consumer'
project(':_includes:tutorials:produce-consume-lang:scala:code:app-producer').name =
'produce-consume-scala-producer-app'
project(':_includes:tutorials:produce-consume-lang:scala:code:app-consumer').name =
'produce-consume-scala-consumer-app'
include '_includes:tutorials:generate-test-data-streams:kafka:code'
include '_includes:tutorials:count-messages:kafka:code'
include '_includes:tutorials:count-messages:confluent:code'
include '_includes:tutorials:kafka-streams-schedule-operations:kstreams:code'
include '_includes:tutorials:sliding-windows:kstreams:code'
include '_includes:tutorials:session-windows:kstreams:code'
include '_includes:tutorials:session-windows:confluent:code'
include '_includes:tutorials:schedule-ktable-ttl:kstreams:code'
include '_includes:tutorials:error-handling:kstreams:code'
include '_includes:tutorials:error-handling:confluent:code'
include '_includes:tutorials:schedule-ktable-ttl-aggregate:kstreams:code'
include '_includes:tutorials:creating-first-apache-kafka-streams-application:kstreams:code'
include '_includes:tutorials:creating-first-apache-kafka-streams-application:confluent:code'
include '_includes:tutorials:multiple-event-types:kafka:code'
include '_includes:tutorials:multiple-event-types:confluent:code'
include '_includes:tutorials:versioned-ktables:kstreams:code'
// <end>
// if new tutorial wasn't included in `settings.gradle` build will fail
// and project needs to be added here
file('_includes/tutorials/').eachDir { dir ->
dir.traverse(type: DIRECTORIES,
maxDepth: 1,
preDir: preDir) {
def directoryName = it.toString()
// ksql projects don't use gradle. we will skip it
if ( ( !(directoryName.contains("ksql")) && !(directoryName.contains("confluent")) ) && directoryName.endsWith("code") ) {
def projectName = getProjectName(directoryName)
if (!findProject(":${projectName}")) {
throw new GradleException(
"Tutorial ${projectName} was not included into the build. Check settings.gradle for details.")
}
}
}
}