@@ -731,7 +731,7 @@ subprojects {
731
731
jacoco {
732
732
toolVersion = versions. jacoco
733
733
}
734
-
734
+
735
735
jacocoTestReport {
736
736
dependsOn tasks. test
737
737
sourceSets sourceSets. main
@@ -755,8 +755,8 @@ subprojects {
755
755
skipProjects = [ " :jmh-benchmarks" , " :trogdor" ]
756
756
skipConfigurations = [ " zinc" ]
757
757
}
758
- // the task `removeUnusedImports` is implemented by google-java-format,
759
- // and unfortunately the google-java-format version used by spotless 6.14.0 can't work with JDK 21.
758
+ // the task `removeUnusedImports` is implemented by google-java-format,
759
+ // and unfortunately the google-java-format version used by spotless 6.14.0 can't work with JDK 21.
760
760
// Hence, we apply spotless tasks only if the env is either JDK11 or JDK17
761
761
if ((JavaVersion . current(). isJava11() || (JavaVersion . current() == JavaVersion . VERSION_17 ))) {
762
762
apply plugin : ' com.diffplug.spotless'
@@ -897,6 +897,54 @@ project(':server') {
897
897
}
898
898
}
899
899
900
+ def copyToTask (AbstractCopyTask task ) {
901
+ task. from(project. file(" $rootDir /bin" )) { into " bin/" }
902
+ task. from(project. file(" $rootDir /config" )) { into " config/" }
903
+ task. from(project. file(" $rootDir /licenses" )) { into " licenses/" }
904
+ task. from(project. file(" $rootDir /docker/docker-compose.yaml" )) { into " docker/" }
905
+ task. from(project. file(" $rootDir /docker/telemetry" )) { into " docker/telemetry/" }
906
+ task. from(project. file(" $rootDir /LICENSE" )) { into " " }
907
+ task. from(project. file(" $rootDir /LICENSE.S3Stream" )) { into " " }
908
+ task. from " $rootDir /NOTICE-binary" rename {String filename -> filename. replace(" -binary" , " " )}
909
+ task. from(configurations. runtimeClasspath) { into(" libs/" ) }
910
+ task. from(configurations. archives. artifacts. files) { into(" libs/" ) }
911
+ task. from(project(' :tools' ). jar) { into(" libs/" ) }
912
+ task. from(project(' :tools' ). configurations. runtimeClasspath) { into(" libs/" ) }
913
+ task. from(project(' :trogdor' ). jar) { into(" libs/" ) }
914
+ task. from(project(' :trogdor' ). configurations. runtimeClasspath) { into(" libs/" ) }
915
+ task. from(project(' :automq-shell' ). jar) { into(" libs/" ) }
916
+ task. from(project(' :automq-shell' ). configurations. runtimeClasspath) { into(" libs/" ) }
917
+ task. from(project(' :shell' ). jar) { into(" libs/" ) }
918
+ task. from(project(' :shell' ). configurations. runtimeClasspath) { into(" libs/" ) }
919
+ task. from(project(' :connect:api' ). jar) { into(" libs/" ) }
920
+ task. from(project(' :connect:api' ). configurations. runtimeClasspath) { into(" libs/" ) }
921
+ task. from(project(' :connect:runtime' ). jar) { into(" libs/" ) }
922
+ task. from(project(' :connect:runtime' ). configurations. runtimeClasspath) { into(" libs/" ) }
923
+ task. from(project(' :connect:transforms' ). jar) { into(" libs/" ) }
924
+ task. from(project(' :connect:transforms' ). configurations. runtimeClasspath) { into(" libs/" ) }
925
+ task. from(project(' :connect:json' ). jar) { into(" libs/" ) }
926
+ task. from(project(' :connect:json' ). configurations. runtimeClasspath) { into(" libs/" ) }
927
+ task. from(project(' :connect:file' ). jar) { into(" libs/" ) }
928
+ task. from(project(' :connect:file' ). configurations. runtimeClasspath) { into(" libs/" ) }
929
+ task. from(project(' :connect:basic-auth-extension' ). jar) { into " libs/" }
930
+ task. from(project(' :connect:basic-auth-extension' ). configurations. runtimeClasspath) { into " libs/" }
931
+ task. from(project(' :connect:mirror' ). jar) { into " libs/" }
932
+ task. from(project(' :connect:mirror' ). configurations. runtimeClasspath) { into " libs/" }
933
+ task. from(project(' :connect:mirror-client' ). jar) { into " libs/" }
934
+ task. from(project(' :connect:mirror-client' ). configurations. runtimeClasspath) { into " libs/" }
935
+ task. from(project(' :streams' ). jar) { into " libs/" }
936
+ task. from(project(' :streams' ). configurations. runtimeClasspath) { into " libs/" }
937
+ task. from(project(' :streams:streams-scala' ). jar) { into " libs/" }
938
+ task. from(project(' :streams:streams-scala' ). configurations. runtimeClasspath) { into " libs/" }
939
+ task. from(project(' :streams:test-utils' ). jar) { into " libs/" }
940
+ task. from(project(' :streams:test-utils' ). configurations. runtimeClasspath) { into " libs/" }
941
+ task. from(project(' :streams:examples' ). jar) { into " libs/" }
942
+ task. from(project(' :streams:examples' ). configurations. runtimeClasspath) { into " libs/" }
943
+ task. from(project(' :tools:tools-api' ). jar) { into " libs/" }
944
+ task. from(project(' :tools:tools-api' ). configurations. runtimeClasspath) { into " libs/" }
945
+ task. duplicatesStrategy ' exclude'
946
+ }
947
+
900
948
project(' :core' ) {
901
949
apply plugin : ' scala'
902
950
@@ -1157,52 +1205,14 @@ project(':core') {
1157
1205
1158
1206
into " ${ prefix} kafka-${ archiveVersion.get()} "
1159
1207
compression = Compression . GZIP
1160
- from(project. file(" $rootDir /bin" )) { into " bin/" }
1161
- from(project. file(" $rootDir /config" )) { into " config/" }
1162
- from(project. file(" $rootDir /licenses" )) { into " licenses/" }
1163
- from(project. file(" $rootDir /docker/docker-compose.yaml" )) { into " docker/" }
1164
- from(project. file(" $rootDir /docker/telemetry" )) { into " docker/telemetry/" }
1165
- from(project. file(" $rootDir /LICENSE" )) { into " " }
1166
- from(project. file(" $rootDir /LICENSE.S3Stream" )) { into " " }
1167
- from " $rootDir /NOTICE-binary" rename {String filename -> filename. replace(" -binary" , " " )}
1168
- from(configurations. runtimeClasspath) { into(" libs/" ) }
1169
- from(configurations. archives. artifacts. files) { into(" libs/" ) }
1208
+
1170
1209
from(project. siteDocsTar) { into(" site-docs/" ) }
1171
- from(project(' :tools' ). jar) { into(" libs/" ) }
1172
- from(project(' :tools' ). configurations. runtimeClasspath) { into(" libs/" ) }
1173
- from(project(' :trogdor' ). jar) { into(" libs/" ) }
1174
- from(project(' :trogdor' ). configurations. runtimeClasspath) { into(" libs/" ) }
1175
- from(project(' :automq-shell' ). jar) { into(" libs/" ) }
1176
- from(project(' :automq-shell' ). configurations. runtimeClasspath) { into(" libs/" ) }
1177
- from(project(' :shell' ). jar) { into(" libs/" ) }
1178
- from(project(' :shell' ). configurations. runtimeClasspath) { into(" libs/" ) }
1179
- from(project(' :connect:api' ). jar) { into(" libs/" ) }
1180
- from(project(' :connect:api' ). configurations. runtimeClasspath) { into(" libs/" ) }
1181
- from(project(' :connect:runtime' ). jar) { into(" libs/" ) }
1182
- from(project(' :connect:runtime' ). configurations. runtimeClasspath) { into(" libs/" ) }
1183
- from(project(' :connect:transforms' ). jar) { into(" libs/" ) }
1184
- from(project(' :connect:transforms' ). configurations. runtimeClasspath) { into(" libs/" ) }
1185
- from(project(' :connect:json' ). jar) { into(" libs/" ) }
1186
- from(project(' :connect:json' ). configurations. runtimeClasspath) { into(" libs/" ) }
1187
- from(project(' :connect:file' ). jar) { into(" libs/" ) }
1188
- from(project(' :connect:file' ). configurations. runtimeClasspath) { into(" libs/" ) }
1189
- from(project(' :connect:basic-auth-extension' ). jar) { into(" libs/" ) }
1190
- from(project(' :connect:basic-auth-extension' ). configurations. runtimeClasspath) { into(" libs/" ) }
1191
- from(project(' :connect:mirror' ). jar) { into(" libs/" ) }
1192
- from(project(' :connect:mirror' ). configurations. runtimeClasspath) { into(" libs/" ) }
1193
- from(project(' :connect:mirror-client' ). jar) { into(" libs/" ) }
1194
- from(project(' :connect:mirror-client' ). configurations. runtimeClasspath) { into(" libs/" ) }
1195
- from(project(' :streams' ). jar) { into(" libs/" ) }
1196
- from(project(' :streams' ). configurations. runtimeClasspath) { into(" libs/" ) }
1197
- from(project(' :streams:streams-scala' ). jar) { into(" libs/" ) }
1198
- from(project(' :streams:streams-scala' ). configurations. runtimeClasspath) { into(" libs/" ) }
1199
- from(project(' :streams:test-utils' ). jar) { into(" libs/" ) }
1200
- from(project(' :streams:test-utils' ). configurations. runtimeClasspath) { into(" libs/" ) }
1201
- from(project(' :streams:examples' ). jar) { into(" libs/" ) }
1202
- from(project(' :streams:examples' ). configurations. runtimeClasspath) { into(" libs/" ) }
1203
- from(project(' :tools:tools-api' ). jar) { into(" libs/" ) }
1204
- from(project(' :tools:tools-api' ). configurations. runtimeClasspath) { into(" libs/" ) }
1205
- duplicatesStrategy ' exclude'
1210
+ copyToTask(it)
1211
+ }
1212
+
1213
+ tasks. create(name : " buildLocal" , dependsOn : configurations. archives. artifacts, type : Copy ) {
1214
+ into layout. buildDirectory. dir(" local" )
1215
+ copyToTask(it)
1206
1216
}
1207
1217
1208
1218
jar {
@@ -1223,7 +1233,7 @@ project(':core') {
1223
1233
// By default gradle does not handle test dependencies between the sub-projects
1224
1234
// This line is to include clients project test jar to dependant-testlibs
1225
1235
from (project(' :clients' ). testJar ) { " $buildDir /dependant-testlibs" }
1226
- // log4j-appender is not in core dependencies,
1236
+ // log4j-appender is not in core dependencies,
1227
1237
// so we add it to dependant-testlibs to avoid ClassNotFoundException in running kafka_log4j_appender.py
1228
1238
from (project(' :log4j-appender' ). jar ) { " $buildDir /dependant-testlibs" }
1229
1239
duplicatesStrategy ' exclude'
@@ -1483,7 +1493,7 @@ project(':transaction-coordinator') {
1483
1493
implementation project(' :clients' )
1484
1494
generator project(' :generator' )
1485
1495
}
1486
-
1496
+
1487
1497
sourceSets {
1488
1498
main {
1489
1499
java {
0 commit comments