49
49
gradleVersion = versions. gradle
50
50
minClientJavaVersion = 11
51
51
minNonClientJavaVersion = 17
52
- modulesNeedingJava11 = [" :clients" , " :generator" , " :streams" , " :streams:test-utils" , " :streams-scala" , " :test-common:test-common-runtime " ]
52
+ modulesNeedingJava11 = [" :clients" , " :generator" , " :streams" , " :streams:test-utils" , " :streams-scala" , " :test-common:test-common-util " ]
53
53
54
54
buildVersionFileName = " kafka-version.properties"
55
55
@@ -139,10 +139,11 @@ ext {
139
139
runtimeTestLibs = [
140
140
libs. slf4jLog4j2,
141
141
libs. junitPlatformLanucher,
142
- project(" :test-common:test-common-runtime" )
142
+ libs. jacksonDatabindYaml,
143
+ project(" :test-common:test-common-util" )
143
144
]
144
145
145
- log4jRuntimeLibs = [
146
+ log4jReleaseLibs = [
146
147
libs. slf4jLog4j2,
147
148
libs. log4j1Bridge2Api,
148
149
libs. jacksonDatabindYaml
@@ -1059,7 +1060,7 @@ project(':core') {
1059
1060
}
1060
1061
1061
1062
dependencies {
1062
- releaseOnly log4jRuntimeLibs
1063
+ releaseOnly log4jReleaseLibs
1063
1064
// `core` is often used in users' tests, define the following dependencies as `api` for backwards compatibility
1064
1065
// even though the `core` module doesn't expose any public API
1065
1066
api project(' :clients' )
@@ -1102,8 +1103,9 @@ project(':core') {
1102
1103
testImplementation project(' :server-common' ). sourceSets. test. output
1103
1104
testImplementation project(' :storage:storage-api' ). sourceSets. test. output
1104
1105
testImplementation project(' :server' ). sourceSets. test. output
1105
- testImplementation project(' :test-common' )
1106
- testImplementation project(' :test-common:test-common-api' )
1106
+ testImplementation project(' :test-common:test-common-runtime' )
1107
+ testImplementation project(' :test-common:test-common-internal-api' )
1108
+ testImplementation project(' :test-common:test-common-util' )
1107
1109
testImplementation libs. bcpkix
1108
1110
testImplementation libs. mockitoCore
1109
1111
testImplementation(libs. apacheda) {
@@ -1535,21 +1537,17 @@ project(':group-coordinator') {
1535
1537
srcJar. dependsOn ' processMessages'
1536
1538
}
1537
1539
1538
- project(' :test-common' ) {
1539
- // Test framework stuff. Implementations that support test-common-api
1540
+
1541
+ project(' :test-common:test-common-internal-api' ) {
1542
+ // Interfaces, config classes, and other test APIs. Java 17 only
1540
1543
base {
1541
- archivesName = " kafka-test-common"
1544
+ archivesName = " kafka-test-common-internal-api "
1542
1545
}
1543
1546
1544
1547
dependencies {
1545
- implementation project(' :core' )
1546
- implementation project(' :metadata' )
1547
- implementation project(' :server' )
1548
- implementation project(' :raft' )
1549
- implementation project(' :storage' )
1550
- implementation project(' :server-common' )
1551
- implementation libs. jacksonDatabindYaml
1552
- implementation libs. slf4jApi
1548
+ implementation project(' :server-common' ) // Only project dependency allowed
1549
+
1550
+ implementation libs. junitJupiterApi
1553
1551
1554
1552
testImplementation libs. junitJupiter
1555
1553
testImplementation libs. mockitoCore
@@ -1559,41 +1557,30 @@ project(':test-common') {
1559
1557
}
1560
1558
1561
1559
checkstyle {
1562
- configProperties = checkstyleConfigProperties(" import-control-test-common.xml" )
1560
+ configProperties = checkstyleConfigProperties(" import-control-test-common-internal-api .xml" )
1563
1561
}
1564
1562
1565
1563
javadoc {
1566
1564
enabled = false
1567
1565
}
1568
1566
}
1569
1567
1570
- project(' :test-common:test-common-api ' ) {
1571
- // Interfaces, config classes, and other test APIs
1568
+ project(' :test-common:test-common-util ' ) {
1569
+ // Runtime-only JUnit extensions for entire project. Java 11 only
1572
1570
base {
1573
- archivesName = " kafka-test-common-api "
1571
+ archivesName = " kafka-test-common-util "
1574
1572
}
1575
1573
1576
1574
dependencies {
1577
- implementation project(' :clients' )
1578
- implementation project(' :core' )
1579
- implementation project(' :group-coordinator' )
1580
- implementation project(' :metadata' )
1581
- implementation project(' :raft' )
1582
- implementation project(' :server' )
1583
- implementation project(' :server-common' )
1584
- implementation project(' :storage' )
1585
- implementation project(' :test-common' )
1575
+ implementation libs. junitPlatformLanucher
1586
1576
implementation libs. junitJupiterApi
1587
-
1588
- testImplementation libs. junitJupiter
1589
- testImplementation libs. mockitoCore
1577
+ implementation libs. junitJupiter
1578
+ implementation libs. slf4jApi
1590
1579
testImplementation testLog4j2Libs
1591
-
1592
- testRuntimeOnly runtimeTestLibs
1593
1580
}
1594
1581
1595
1582
checkstyle {
1596
- configProperties = checkstyleConfigProperties(" import-control-test-common-api .xml" )
1583
+ configProperties = checkstyleConfigProperties(" import-control-test-common-util .xml" )
1597
1584
}
1598
1585
1599
1586
javadoc {
@@ -1602,21 +1589,36 @@ project(':test-common:test-common-api') {
1602
1589
}
1603
1590
1604
1591
project(' :test-common:test-common-runtime' ) {
1605
- // Runtime-only test code including JUnit extentions
1592
+ // Runtime-only JUnit extensions for integration tests. Java 17 only
1606
1593
base {
1607
1594
archivesName = " kafka-test-common-runtime"
1608
1595
}
1609
1596
1610
1597
dependencies {
1598
+ implementation project(' :test-common:test-common-internal-api' )
1599
+ implementation project(' :clients' )
1600
+ implementation project(' :core' )
1601
+ implementation project(' :group-coordinator' )
1602
+ implementation project(' :metadata' )
1603
+ implementation project(' :raft' )
1604
+ implementation project(' :server' )
1605
+ implementation project(' :server-common' )
1606
+ implementation project(' :storage' )
1607
+
1611
1608
implementation libs. junitPlatformLanucher
1612
- implementation libs. junitJupiterApi
1613
1609
implementation libs. junitJupiter
1610
+ implementation libs. jacksonDatabindYaml
1614
1611
implementation libs. slf4jApi
1612
+
1613
+ testImplementation libs. junitJupiter
1614
+ testImplementation libs. mockitoCore
1615
1615
testImplementation testLog4j2Libs
1616
+
1617
+ testRuntimeOnly runtimeTestLibs
1616
1618
}
1617
1619
1618
1620
checkstyle {
1619
- configProperties = checkstyleConfigProperties(" import-control-test-common-api .xml" )
1621
+ configProperties = checkstyleConfigProperties(" import-control-test-common-runtime .xml" )
1620
1622
}
1621
1623
1622
1624
javadoc {
@@ -1644,8 +1646,8 @@ project(':transaction-coordinator') {
1644
1646
testImplementation libs. junitJupiter
1645
1647
testImplementation libs. mockitoCore
1646
1648
testImplementation project(' :clients' ). sourceSets. test. output
1647
- testImplementation project(' :test-common' )
1648
- testImplementation project(' :test-common:test-common-api' )
1649
+ testImplementation project(' :test-common:test-common-runtime ' )
1650
+ testImplementation project(' :test-common:test-common-internal- api' )
1649
1651
1650
1652
testRuntimeOnly runtimeTestLibs
1651
1653
@@ -1866,6 +1868,7 @@ project(':clients') {
1866
1868
compileOnly libs. jose4j // for SASL/OAUTHBEARER JWT validation; only used by broker
1867
1869
1868
1870
1871
+ testImplementation project(' :test-common:test-common-util' )
1869
1872
testImplementation libs. bcpkix
1870
1873
testImplementation libs. jacksonJakartarsJsonProvider
1871
1874
testImplementation libs. jose4j
@@ -1880,7 +1883,6 @@ project(':clients') {
1880
1883
testRuntimeOnly libs. jacksonDatabind
1881
1884
testRuntimeOnly libs. jacksonJDK8Datatypes
1882
1885
testRuntimeOnly runtimeTestLibs
1883
- testRuntimeOnly log4jRuntimeLibs
1884
1886
1885
1887
generator project(' :generator' )
1886
1888
}
@@ -2267,7 +2269,8 @@ project(':storage') {
2267
2269
testImplementation project(' :clients' ). sourceSets. test. output
2268
2270
testImplementation project(' :core' )
2269
2271
testImplementation project(' :core' ). sourceSets. test. output
2270
- testImplementation project(' :test-common:test-common-api' )
2272
+ testImplementation project(' :test-common:test-common-internal-api' )
2273
+ testImplementation project(' :test-common:test-common-runtime' )
2271
2274
testImplementation project(' :server' )
2272
2275
testImplementation project(' :server-common' )
2273
2276
testImplementation project(' :server-common' ). sourceSets. test. output
@@ -2424,7 +2427,7 @@ project(':tools') {
2424
2427
}
2425
2428
2426
2429
dependencies {
2427
- releaseOnly log4jRuntimeLibs
2430
+ releaseOnly log4jReleaseLibs
2428
2431
2429
2432
implementation project(' :clients' )
2430
2433
implementation project(' :metadata' )
@@ -2456,7 +2459,8 @@ project(':tools') {
2456
2459
testImplementation project(' :server' ). sourceSets. test. output
2457
2460
testImplementation project(' :core' )
2458
2461
testImplementation project(' :core' ). sourceSets. test. output
2459
- testImplementation project(' :test-common:test-common-api' )
2462
+ testImplementation project(' :test-common:test-common-internal-api' )
2463
+ testImplementation project(' :test-common:test-common-runtime' )
2460
2464
testImplementation project(' :server-common' )
2461
2465
testImplementation project(' :server-common' ). sourceSets. test. output
2462
2466
testImplementation project(' :connect:api' )
@@ -2467,7 +2471,6 @@ project(':tools') {
2467
2471
testImplementation project(' :streams' )
2468
2472
testImplementation project(' :streams' ). sourceSets. test. output
2469
2473
testImplementation project(' :streams:integration-tests' ). sourceSets. test. output
2470
- testImplementation project(' :test-common' )
2471
2474
testImplementation libs. junitJupiter
2472
2475
testImplementation libs. mockitoCore
2473
2476
testImplementation libs. mockitoJunitJupiter // supports MockitoExtension
@@ -2648,7 +2651,6 @@ project(':streams') {
2648
2651
2649
2652
testRuntimeOnly project(' :streams:test-utils' )
2650
2653
testRuntimeOnly runtimeTestLibs
2651
- testRuntimeOnly log4jRuntimeLibs
2652
2654
2653
2655
generator project(' :generator' )
2654
2656
}
@@ -2839,7 +2841,7 @@ project(':streams:integration-tests') {
2839
2841
testImplementation project(' :storage' )
2840
2842
testImplementation project(' :streams' ). sourceSets. test. output
2841
2843
testImplementation project(' :streams:streams-scala' )
2842
- testImplementation project(' :test-common' )
2844
+ testImplementation project(' :test-common:test-common-runtime ' )
2843
2845
testImplementation project(' :tools' )
2844
2846
testImplementation project(' :transaction-coordinator' )
2845
2847
testImplementation libs. bcpkix
@@ -3515,14 +3517,15 @@ project(':connect:runtime') {
3515
3517
testImplementation project(' :server' )
3516
3518
testImplementation project(' :metadata' )
3517
3519
testImplementation project(' :server-common' )
3518
- testImplementation project(' :test-common' )
3520
+ testImplementation project(' :test-common:test-common-internal-api' )
3521
+ testImplementation project(' :test-common:test-common-util' )
3522
+ testImplementation project(' :test-common:test-common-runtime' )
3519
3523
testImplementation project(' :server-common' )
3520
3524
testImplementation project(' :server' )
3521
3525
testImplementation project(' :group-coordinator' )
3522
3526
testImplementation project(' :storage' )
3523
3527
testImplementation project(' :connect:test-plugins' )
3524
3528
testImplementation project(' :server-common' ). sourceSets. test. output
3525
- testImplementation project(' :test-common:test-common-api' )
3526
3529
3527
3530
testImplementation libs. jacksonDatabindYaml
3528
3531
testImplementation libs. junitJupiter
@@ -3636,7 +3639,7 @@ project(':connect:file') {
3636
3639
testImplementation project(' :connect:runtime' )
3637
3640
testImplementation project(' :connect:runtime' ). sourceSets. test. output
3638
3641
testImplementation project(' :core' )
3639
- testImplementation project(' :test-common' )
3642
+ testImplementation project(' :test-common:test-common-runtime ' )
3640
3643
testImplementation project(' :server-common' ). sourceSets. test. output
3641
3644
3642
3645
testRuntimeOnly runtimeTestLibs
@@ -3740,7 +3743,7 @@ project(':connect:mirror') {
3740
3743
testImplementation project(' :clients' ). sourceSets. test. output
3741
3744
testImplementation project(' :connect:runtime' ). sourceSets. test. output
3742
3745
testImplementation project(' :core' )
3743
- testImplementation project(' :test-common' )
3746
+ testImplementation project(' :test-common:test-common-runtime ' )
3744
3747
testImplementation project(' :server' )
3745
3748
testImplementation project(' :server-common' ). sourceSets. test. output
3746
3749
0 commit comments