@@ -29,21 +29,22 @@ buildscript {
2929}
3030
3131plugins {
32- id ' com.github.ben-manes.versions' version ' 0.53 .0'
32+ id ' com.github.ben-manes.versions' version ' 0.48 .0'
3333 id ' idea'
3434 id ' jacoco'
3535 id ' java-library'
36- id ' org.owasp.dependencycheck' version ' 12.1.3 '
36+ id ' org.owasp.dependencycheck' version ' 8.2.1 '
3737 id ' org.nosphere.apache.rat' version " 0.8.1"
3838 id " io.swagger.core.v3.swagger-gradle-plugin" version " ${ swaggerVersion} "
3939
40- id " com.github.spotbugs" version ' 6.2.5 ' apply false
40+ id " com.github.spotbugs" version ' 6.2.3 ' apply false
4141 id ' org.scoverage' version ' 8.0.3' apply false
42- id ' com.gradleup. shadow' version ' 8.3.9 ' apply false
43- id ' com.diffplug.spotless' version " 7.2.1 "
42+ id ' com.github.johnrengelman. shadow' version ' 8.0.0 ' apply false
43+ id ' com.diffplug.spotless' version " 6.25.0 "
4444}
4545
4646ext {
47+ gradleVersion = versions. gradle
4748 minClientJavaVersion = 11
4849 minNonClientJavaVersion = 17
4950 modulesNeedingJava11 = [" :clients" , " :generator" , " :streams" , " :streams:test-utils" , " :streams:examples" , " :streams-scala" , " :test-common:test-common-util" ]
7172 " --add-opens=java.security.jgss/sun.security.krb5=ALL-UNNAMED"
7273 )
7374
74- if (JavaVersion . current(). isCompatibleWith(JavaVersion . VERSION_25 )) {
75- // Spotbugs is not compatible with Java 25+ so Gradle related tasks are disabled
76- // until version can be upgraded: https://github.com/spotbugs/spotbugs/issues/3564
77- project. gradle. startParameter. excludedTaskNames. add(" spotbugsMain" )
78- project. gradle. startParameter. excludedTaskNames. add(" spotbugsTest" )
79- }
80-
8175 maxTestForks = project. hasProperty(' maxParallelForks' ) ? maxParallelForks. toInteger() : Runtime . runtime. availableProcessors()
8276 maxScalacThreads = project. hasProperty(' maxScalacThreads' ) ? maxScalacThreads. toInteger() :
8377 Math . min(Runtime . runtime. availableProcessors(), 8 )
@@ -303,7 +297,7 @@ if (repo != null) {
303297} else {
304298 rat. enabled = false
305299}
306- println (" Starting build with version $version (commit id ${ commitId == null ? "null" : commitId.take(8)} ) using Gradle $v ersions . gradle , Java ${ JavaVersion.current()} and Scala ${ versions.scala} " )
300+ println (" Starting build with version $version (commit id ${ commitId == null ? "null" : commitId.take(8)} ) using Gradle $g radleVersion , Java ${ JavaVersion.current()} and Scala ${ versions.scala} " )
307301println (" Build properties: ignoreFailures=$userIgnoreFailures , maxParallelForks=$maxTestForks , maxScalacThreads=$maxScalacThreads , maxTestRetries=$userMaxTestRetries " )
308302
309303subprojects {
@@ -322,7 +316,19 @@ subprojects {
322316 // We use the shadow plugin for the jmh-benchmarks module and the `-all` jar can get pretty large, so
323317 // don't publish it
324318 def shouldPublish = ! project. name. equals(' jmh-benchmarks' )
325- def shouldPublishWithShadow = ([' clients' ]. contains(project. name))
319+ def shouldPublishWithShadow = false // Temporarily disabled due to ASM compatibility issue
320+ // def shouldPublishWithShadow = (['clients'].contains(project.name))
321+
322+ if (shouldPublishWithShadow) {
323+ apply plugin : ' com.github.johnrengelman.shadow'
324+ }
325+
326+ // Fix for upgrade system tests that may not have actual test files
327+ if (project. name. startsWith(' upgrade-system-tests' )) {
328+ tasks. withType(Test ) {
329+ failOnNoDiscoveredTests = false
330+ }
331+ }
326332
327333 if (shouldPublish) {
328334 apply plugin : ' maven-publish'
@@ -334,16 +340,6 @@ subprojects {
334340 tasks. register(' uploadArchives' ). configure { dependsOn(publish) }
335341 }
336342
337- tasks. withType(AbstractArchiveTask ). configureEach {
338- reproducibleFileOrder = false
339- preserveFileTimestamps = true
340- useFileSystemPermissions()
341- }
342-
343- tasks. withType(AbstractTestTask ). configureEach {
344- failOnNoDiscoveredTests = false
345- }
346-
347343 // apply the eclipse plugin only to subprojects that hold code. 'connect' is just a folder.
348344 if (! project. name. equals(' connect' )) {
349345 apply plugin : ' eclipse'
@@ -379,8 +375,8 @@ subprojects {
379375 if (! shouldPublishWithShadow) {
380376 from components. java
381377 } else {
382- apply plugin : ' com.gradleup. shadow'
383- from components. shadow
378+ // Temporarily use java components instead of shadow due to ASM compatibility issue
379+ from components. java
384380
385381 // Fix for avoiding inclusion of runtime dependencies marked as 'shadow' in MANIFEST Class-Path.
386382 // https://github.com/GradleUp/shadow/issues/324
@@ -1055,8 +1051,6 @@ project(':core') {
10551051 implementation project(' :transaction-coordinator' )
10561052 implementation project(' :metadata' )
10571053 implementation project(' :storage:storage-api' )
1058- // tools-api is automatically included in releaseTarGz via core's runtimeClasspath.
1059- // If removed from here, remember to explicitly add it back in the releaseTarGz task.
10601054 implementation project(' :tools:tools-api' )
10611055 implementation project(' :raft' )
10621056 implementation project(' :storage' )
@@ -1279,6 +1273,8 @@ project(':core') {
12791273 from(project(' :streams:test-utils' ). configurations. runtimeClasspath) { into(" libs/" ) }
12801274 from(project(' :streams:examples' ). jar) { into(" libs/" ) }
12811275 from(project(' :streams:examples' ). configurations. runtimeClasspath) { into(" libs/" ) }
1276+ from(project(' :tools:tools-api' ). jar) { into(" libs/" ) }
1277+ from(project(' :tools:tools-api' ). configurations. runtimeClasspath) { into(" libs/" ) }
12821278 duplicatesStrategy ' exclude'
12831279 }
12841280
@@ -1911,41 +1907,22 @@ project(':clients') {
19111907 }
19121908 }
19131909
1914- shadowJar {
1915- dependsOn createVersionFile
1916- // archiveClassifier defines the classifier for the shadow jar, the default is 'all'.
1917- // We don't want to use the default classifier because it will cause the shadow jar to
1918- // overwrite the original jar. We also don't want to use the 'shadow' classifier because
1919- // it will cause the shadow jar to be named kafka-clients-shadow.jar. We want to use the
1920- // same name as the original jar, kafka-clients.jar.
1921- archiveClassifier = null
1922- // KIP-714: move shaded dependencies to a shaded location
1923- relocate(' io.opentelemetry.proto' , ' org.apache.kafka.shaded.io.opentelemetry.proto' )
1924- relocate(' com.google.protobuf' , ' org.apache.kafka.shaded.com.google.protobuf' )
1925-
1926- // dependencies excluded from the final jar, since they are declared as runtime dependencies
1927- dependencies {
1928- project. configurations. shadowed. allDependencies. each {
1929- exclude(dependency(it))
1930- }
1931- // exclude proto files from the jar
1932- exclude " **/opentelemetry/proto/**/*.proto"
1933- exclude " **/google/protobuf/*.proto"
1934- }
1910+ // Temporarily disabled shadowJar configuration due to ASM compatibility issue
1911+ // Use regular jar instead
19351912
1913+ jar {
1914+ enabled true
1915+ dependsOn createVersionFile
1916+
1917+ // Add the version file and licenses to regular jar
19361918 from(" ${ layout.buildDirectory.get().asFile.path} " ) {
19371919 include " kafka/$buildVersionFileName "
19381920 }
1939-
1921+
19401922 from " $rootDir /LICENSE"
19411923 from " $rootDir /NOTICE"
19421924 }
19431925
1944- jar {
1945- enabled false
1946- dependsOn ' shadowJar'
1947- }
1948-
19491926 clean. doFirst {
19501927 delete " ${ layout.buildDirectory.get().asFile.path} /kafka/"
19511928 }
@@ -2673,7 +2650,7 @@ project(':streams') {
26732650 }
26742651
26752652 dependencies {
2676- api project(path : ' :clients' , configuration : ' shadow' )
2653+ api project(path : ' :clients' ) // Changed from 'shadow' configuration due to ASM compatibility issue
26772654 // `org.rocksdb.Options` is part of Kafka Streams public api via `RocksDBConfigSetter`
26782655 api libs. rocksDBJni
26792656
@@ -3381,11 +3358,14 @@ project(':streams:upgrade-system-tests-41') {
33813358
33823359project(' :jmh-benchmarks' ) {
33833360
3384- apply plugin : ' com.gradleup.shadow'
3361+ // Temporarily disabled due to ASM compatibility issue
3362+ // apply plugin: 'com.github.johnrengelman.shadow'
33853363
3364+ /*
33863365 shadowJar {
33873366 archiveBaseName = 'kafka-jmh-benchmarks'
33883367 }
3368+ */
33893369
33903370 dependencies {
33913371 implementation(project(' :core' )) {
0 commit comments