69
69
gradleVersion = versions. gradle
70
70
minClientJavaVersion = 11
71
71
minNonClientJavaVersion = 17
72
- modulesNeedingJava11 = [" :clients" , " :generator" , " :streams" , " :streams:test-utils" , " :streams-scala" , " :test-common:test-common-runtime " ]
72
+ modulesNeedingJava11 = [" :clients" , " :generator" , " :streams" , " :streams:test-utils" , " :streams-scala" , " :test-common:test-common-util " ]
73
73
74
74
buildVersionFileName = " kafka-version.properties"
75
75
@@ -160,10 +160,11 @@ ext {
160
160
runtimeTestLibs = [
161
161
libs. slf4jLog4j2,
162
162
libs. junitPlatformLanucher,
163
- project(" :test-common:test-common-runtime" )
163
+ libs. jacksonDatabindYaml,
164
+ project(" :test-common:test-common-util" )
164
165
]
165
166
166
- log4jRuntimeLibs = [
167
+ log4jReleaseLibs = [
167
168
libs. slf4jLog4j2,
168
169
libs. log4j1Bridge2Api,
169
170
libs. jacksonDatabindYaml
@@ -1118,7 +1119,7 @@ project(':core') {
1118
1119
}
1119
1120
1120
1121
dependencies {
1121
- releaseOnly log4jRuntimeLibs
1122
+ releaseOnly log4jReleaseLibs
1122
1123
// `core` is often used in users' tests, define the following dependencies as `api` for backwards compatibility
1123
1124
// even though the `core` module doesn't expose any public API
1124
1125
api project(' :clients' )
@@ -1161,8 +1162,9 @@ project(':core') {
1161
1162
testImplementation project(' :server-common' ). sourceSets. test. output
1162
1163
testImplementation project(' :storage:storage-api' ). sourceSets. test. output
1163
1164
testImplementation project(' :server' ). sourceSets. test. output
1164
- testImplementation project(' :test-common' )
1165
- testImplementation project(' :test-common:test-common-api' )
1165
+ testImplementation project(' :test-common:test-common-runtime' )
1166
+ testImplementation project(' :test-common:test-common-internal-api' )
1167
+ testImplementation project(' :test-common:test-common-util' )
1166
1168
testImplementation libs. bcpkix
1167
1169
testImplementation libs. mockitoCore
1168
1170
testImplementation(libs. apacheda) {
@@ -1598,21 +1600,17 @@ project(':group-coordinator') {
1598
1600
srcJar. dependsOn ' processMessages'
1599
1601
}
1600
1602
1601
- project(' :test-common' ) {
1602
- // Test framework stuff. Implementations that support test-common-api
1603
+
1604
+ project(' :test-common:test-common-internal-api' ) {
1605
+ // Interfaces, config classes, and other test APIs. Java 17 only
1603
1606
base {
1604
- archivesName = " kafka-test-common"
1607
+ archivesName = " kafka-test-common-internal-api "
1605
1608
}
1606
1609
1607
1610
dependencies {
1608
- implementation project(' :core' )
1609
- implementation project(' :metadata' )
1610
- implementation project(' :server' )
1611
- implementation project(' :raft' )
1612
- implementation project(' :storage' )
1613
- implementation project(' :server-common' )
1614
- implementation libs. jacksonDatabindYaml
1615
- implementation libs. slf4jApi
1611
+ implementation project(' :server-common' ) // Only project dependency allowed
1612
+
1613
+ implementation libs. junitJupiterApi
1616
1614
1617
1615
testImplementation libs. junitJupiter
1618
1616
testImplementation libs. mockitoCore
@@ -1622,41 +1620,30 @@ project(':test-common') {
1622
1620
}
1623
1621
1624
1622
checkstyle {
1625
- configProperties = checkstyleConfigProperties(" import-control-test-common.xml" )
1623
+ configProperties = checkstyleConfigProperties(" import-control-test-common-internal-api .xml" )
1626
1624
}
1627
1625
1628
1626
javadoc {
1629
1627
enabled = false
1630
1628
}
1631
1629
}
1632
1630
1633
- project(' :test-common:test-common-api ' ) {
1634
- // Interfaces, config classes, and other test APIs
1631
+ project(' :test-common:test-common-util ' ) {
1632
+ // Runtime-only JUnit extensions for entire project. Java 11 only
1635
1633
base {
1636
- archivesName = " kafka-test-common-api "
1634
+ archivesName = " kafka-test-common-util "
1637
1635
}
1638
1636
1639
1637
dependencies {
1640
- implementation project(' :clients' )
1641
- implementation project(' :core' )
1642
- implementation project(' :group-coordinator' )
1643
- implementation project(' :metadata' )
1644
- implementation project(' :raft' )
1645
- implementation project(' :server' )
1646
- implementation project(' :server-common' )
1647
- implementation project(' :storage' )
1648
- implementation project(' :test-common' )
1638
+ implementation libs. junitPlatformLanucher
1649
1639
implementation libs. junitJupiterApi
1650
-
1651
- testImplementation libs. junitJupiter
1652
- testImplementation libs. mockitoCore
1640
+ implementation libs. junitJupiter
1641
+ implementation libs. slf4jApi
1653
1642
testImplementation testLog4j2Libs
1654
-
1655
- testRuntimeOnly runtimeTestLibs
1656
1643
}
1657
1644
1658
1645
checkstyle {
1659
- configProperties = checkstyleConfigProperties(" import-control-test-common-api .xml" )
1646
+ configProperties = checkstyleConfigProperties(" import-control-test-common-util .xml" )
1660
1647
}
1661
1648
1662
1649
javadoc {
@@ -1665,21 +1652,36 @@ project(':test-common:test-common-api') {
1665
1652
}
1666
1653
1667
1654
project(' :test-common:test-common-runtime' ) {
1668
- // Runtime-only test code including JUnit extentions
1655
+ // Runtime-only JUnit extensions for integration tests. Java 17 only
1669
1656
base {
1670
1657
archivesName = " kafka-test-common-runtime"
1671
1658
}
1672
1659
1673
1660
dependencies {
1661
+ implementation project(' :test-common:test-common-internal-api' )
1662
+ implementation project(' :clients' )
1663
+ implementation project(' :core' )
1664
+ implementation project(' :group-coordinator' )
1665
+ implementation project(' :metadata' )
1666
+ implementation project(' :raft' )
1667
+ implementation project(' :server' )
1668
+ implementation project(' :server-common' )
1669
+ implementation project(' :storage' )
1670
+
1674
1671
implementation libs. junitPlatformLanucher
1675
- implementation libs. junitJupiterApi
1676
1672
implementation libs. junitJupiter
1673
+ implementation libs. jacksonDatabindYaml
1677
1674
implementation libs. slf4jApi
1675
+
1676
+ testImplementation libs. junitJupiter
1677
+ testImplementation libs. mockitoCore
1678
1678
testImplementation testLog4j2Libs
1679
+
1680
+ testRuntimeOnly runtimeTestLibs
1679
1681
}
1680
1682
1681
1683
checkstyle {
1682
- configProperties = checkstyleConfigProperties(" import-control-test-common-api .xml" )
1684
+ configProperties = checkstyleConfigProperties(" import-control-test-common-runtime .xml" )
1683
1685
}
1684
1686
1685
1687
javadoc {
@@ -1707,8 +1709,8 @@ project(':transaction-coordinator') {
1707
1709
testImplementation libs. junitJupiter
1708
1710
testImplementation libs. mockitoCore
1709
1711
testImplementation project(' :clients' ). sourceSets. test. output
1710
- testImplementation project(' :test-common' )
1711
- testImplementation project(' :test-common:test-common-api' )
1712
+ testImplementation project(' :test-common:test-common-runtime ' )
1713
+ testImplementation project(' :test-common:test-common-internal- api' )
1712
1714
1713
1715
testRuntimeOnly runtimeTestLibs
1714
1716
@@ -1929,6 +1931,7 @@ project(':clients') {
1929
1931
compileOnly libs. jose4j // for SASL/OAUTHBEARER JWT validation; only used by broker
1930
1932
1931
1933
1934
+ testImplementation project(' :test-common:test-common-util' )
1932
1935
testImplementation libs. bcpkix
1933
1936
testImplementation libs. jacksonJakartarsJsonProvider
1934
1937
testImplementation libs. jose4j
@@ -1943,7 +1946,6 @@ project(':clients') {
1943
1946
testRuntimeOnly libs. jacksonDatabind
1944
1947
testRuntimeOnly libs. jacksonJDK8Datatypes
1945
1948
testRuntimeOnly runtimeTestLibs
1946
- testRuntimeOnly log4jRuntimeLibs
1947
1949
1948
1950
generator project(' :generator' )
1949
1951
}
@@ -2330,7 +2332,8 @@ project(':storage') {
2330
2332
testImplementation project(' :clients' ). sourceSets. test. output
2331
2333
testImplementation project(' :core' )
2332
2334
testImplementation project(' :core' ). sourceSets. test. output
2333
- testImplementation project(' :test-common:test-common-api' )
2335
+ testImplementation project(' :test-common:test-common-internal-api' )
2336
+ testImplementation project(' :test-common:test-common-runtime' )
2334
2337
testImplementation project(' :server' )
2335
2338
testImplementation project(' :server-common' )
2336
2339
testImplementation project(' :server-common' ). sourceSets. test. output
@@ -2487,7 +2490,7 @@ project(':tools') {
2487
2490
}
2488
2491
2489
2492
dependencies {
2490
- releaseOnly log4jRuntimeLibs
2493
+ releaseOnly log4jReleaseLibs
2491
2494
2492
2495
implementation project(' :clients' )
2493
2496
implementation project(' :metadata' )
@@ -2519,7 +2522,8 @@ project(':tools') {
2519
2522
testImplementation project(' :server' ). sourceSets. test. output
2520
2523
testImplementation project(' :core' )
2521
2524
testImplementation project(' :core' ). sourceSets. test. output
2522
- testImplementation project(' :test-common:test-common-api' )
2525
+ testImplementation project(' :test-common:test-common-internal-api' )
2526
+ testImplementation project(' :test-common:test-common-runtime' )
2523
2527
testImplementation project(' :server-common' )
2524
2528
testImplementation project(' :server-common' ). sourceSets. test. output
2525
2529
testImplementation project(' :connect:api' )
@@ -2530,7 +2534,6 @@ project(':tools') {
2530
2534
testImplementation project(' :streams' )
2531
2535
testImplementation project(' :streams' ). sourceSets. test. output
2532
2536
testImplementation project(' :streams:integration-tests' ). sourceSets. test. output
2533
- testImplementation project(' :test-common' )
2534
2537
testImplementation libs. junitJupiter
2535
2538
testImplementation libs. mockitoCore
2536
2539
testImplementation libs. mockitoJunitJupiter // supports MockitoExtension
@@ -2711,7 +2714,6 @@ project(':streams') {
2711
2714
2712
2715
testRuntimeOnly project(' :streams:test-utils' )
2713
2716
testRuntimeOnly runtimeTestLibs
2714
- testRuntimeOnly log4jRuntimeLibs
2715
2717
2716
2718
generator project(' :generator' )
2717
2719
}
@@ -2902,7 +2904,7 @@ project(':streams:integration-tests') {
2902
2904
testImplementation project(' :storage' )
2903
2905
testImplementation project(' :streams' ). sourceSets. test. output
2904
2906
testImplementation project(' :streams:streams-scala' )
2905
- testImplementation project(' :test-common' )
2907
+ testImplementation project(' :test-common:test-common-runtime ' )
2906
2908
testImplementation project(' :tools' )
2907
2909
testImplementation project(' :transaction-coordinator' )
2908
2910
testImplementation libs. bcpkix
@@ -3578,14 +3580,15 @@ project(':connect:runtime') {
3578
3580
testImplementation project(' :server' )
3579
3581
testImplementation project(' :metadata' )
3580
3582
testImplementation project(' :server-common' )
3581
- testImplementation project(' :test-common' )
3583
+ testImplementation project(' :test-common:test-common-internal-api' )
3584
+ testImplementation project(' :test-common:test-common-util' )
3585
+ testImplementation project(' :test-common:test-common-runtime' )
3582
3586
testImplementation project(' :server-common' )
3583
3587
testImplementation project(' :server' )
3584
3588
testImplementation project(' :group-coordinator' )
3585
3589
testImplementation project(' :storage' )
3586
3590
testImplementation project(' :connect:test-plugins' )
3587
3591
testImplementation project(' :server-common' ). sourceSets. test. output
3588
- testImplementation project(' :test-common:test-common-api' )
3589
3592
3590
3593
testImplementation libs. jacksonDatabindYaml
3591
3594
testImplementation libs. junitJupiter
@@ -3699,7 +3702,7 @@ project(':connect:file') {
3699
3702
testImplementation project(' :connect:runtime' )
3700
3703
testImplementation project(' :connect:runtime' ). sourceSets. test. output
3701
3704
testImplementation project(' :core' )
3702
- testImplementation project(' :test-common' )
3705
+ testImplementation project(' :test-common:test-common-runtime ' )
3703
3706
testImplementation project(' :server-common' ). sourceSets. test. output
3704
3707
3705
3708
testRuntimeOnly runtimeTestLibs
@@ -3803,7 +3806,7 @@ project(':connect:mirror') {
3803
3806
testImplementation project(' :clients' ). sourceSets. test. output
3804
3807
testImplementation project(' :connect:runtime' ). sourceSets. test. output
3805
3808
testImplementation project(' :core' )
3806
- testImplementation project(' :test-common' )
3809
+ testImplementation project(' :test-common:test-common-runtime ' )
3807
3810
testImplementation project(' :server' )
3808
3811
testImplementation project(' :server-common' ). sourceSets. test. output
3809
3812
0 commit comments