This is an automated email from the ASF dual-hosted git repository.

chia7712 pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 95c21871dd7 KAFKA-20553 Eliminate the dependencies on 
sourceSets.test.output for group-coordinator and share-coordinator (#22254)
95c21871dd7 is described below

commit 95c21871dd75a3100a6d56d213180ad7e0cd0e5f
Author: Ken Huang <[email protected]>
AuthorDate: Tue May 12 11:32:26 2026 +0800

    KAFKA-20553 Eliminate the dependencies on sourceSets.test.output for 
group-coordinator and share-coordinator (#22254)
    
    Gradle test fixtures to the clients module and removes all dependencies
    on sourceSets.test.output. We should revisit other usages in this JIRA.
    This will simplify the dependency graph and unblock the upgrade to
    Gradle 9.5+
    
    This patch is working on `group-coordinator` and `share-coordinator`
    
    Reviewers: Chia-Ping Tsai <[email protected]>
---
 build.gradle                                            | 17 +++++++++++++++--
 .../org/apache/kafka/coordinator/group/Assertions.java  |  0
 .../coordinator/share/ShareCoordinatorTestConfig.java   |  0
 3 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/build.gradle b/build.gradle
index 800bae5822d..36453756db4 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1139,8 +1139,8 @@ project(':core') {
     implementation libs.re2j
 
     testImplementation testFixtures(project(':clients'))
-    testImplementation project(':group-coordinator').sourceSets.test.output
-    testImplementation project(':share-coordinator').sourceSets.test.output
+    testImplementation testFixtures(project(':group-coordinator'))
+    testImplementation testFixtures(project(':share-coordinator'))
     testImplementation project(':metadata').sourceSets.test.output
     testImplementation project(':raft').sourceSets.test.output
     testImplementation testFixtures(project(':server-common'))
@@ -1520,6 +1520,8 @@ project(':group-coordinator') {
     archivesName = "kafka-group-coordinator"
   }
 
+  apply plugin: 'java-test-fixtures'
+
   configurations {
     generator
   }
@@ -1539,6 +1541,11 @@ project(':group-coordinator') {
     implementation libs.slf4jApi
     implementation libs.hash4j
 
+    testFixturesImplementation project(':clients')
+    testFixturesImplementation project(':coordinator-common')
+    testFixturesImplementation project(':server-common')
+    testFixturesImplementation libs.junitJupiter
+
     testImplementation testFixtures(project(':clients'))
     testImplementation testFixtures(project(':server-common'))
     testImplementation project(':coordinator-common').sourceSets.test.output
@@ -1791,6 +1798,8 @@ project(':share-coordinator') {
     archivesName = "kafka-share-coordinator"
   }
 
+  apply plugin: 'java-test-fixtures'
+
   configurations {
     generator
   }
@@ -1804,6 +1813,8 @@ project(':share-coordinator') {
     implementation libs.metrics
     implementation libs.slf4jApi
 
+    testFixturesImplementation project(':clients')
+
     testImplementation testFixtures(project(':clients'))
     testImplementation testFixtures(project(':server-common'))
     testImplementation project(':coordinator-common').sourceSets.test.output
@@ -4078,6 +4089,8 @@ gradle.projectsEvaluated {
     'clients': ':clients',
     'server-common': ':server-common',
     'storage/api': ':storage:storage-api',
+    'group-coordinator': ':group-coordinator',
+    'share-coordinator': ':share-coordinator',
   ]
   allprojects { proj ->
     proj.configurations.all { config ->
diff --git 
a/group-coordinator/src/test/java/org/apache/kafka/coordinator/group/Assertions.java
 
b/group-coordinator/src/testFixtures/java/org/apache/kafka/coordinator/group/Assertions.java
similarity index 100%
rename from 
group-coordinator/src/test/java/org/apache/kafka/coordinator/group/Assertions.java
rename to 
group-coordinator/src/testFixtures/java/org/apache/kafka/coordinator/group/Assertions.java
diff --git 
a/share-coordinator/src/test/java/org/apache/kafka/coordinator/share/ShareCoordinatorTestConfig.java
 
b/share-coordinator/src/testFixtures/java/org/apache/kafka/coordinator/share/ShareCoordinatorTestConfig.java
similarity index 100%
rename from 
share-coordinator/src/test/java/org/apache/kafka/coordinator/share/ShareCoordinatorTestConfig.java
rename to 
share-coordinator/src/testFixtures/java/org/apache/kafka/coordinator/share/ShareCoordinatorTestConfig.java

Reply via email to