From 8b5d755bf674e0d700fc87e792b4bf4791c298c9 Mon Sep 17 00:00:00 2001 From: Ken Huang Date: Fri, 4 Oct 2024 03:00:30 +0800 Subject: [PATCH] KAFKA-17685 Define common testRuntimeOnly dependencies (#17355) Reviewers: David Arthur --- build.gradle | 77 ++++++++++++++++++++++------------------------------ 1 file changed, 32 insertions(+), 45 deletions(-) diff --git a/build.gradle b/build.gradle index 4b98bf32237..5a864ca43c2 100644 --- a/build.gradle +++ b/build.gradle @@ -122,6 +122,11 @@ ext { if (name == "compileTestJava" || name == "compileTestScala") options.compilerArgs << "-parameters" } + + runtimeTestLibs = [ + libs.slf4jReload4j, + libs.junitPlatformLanucher, + ] } allprojects { @@ -1476,8 +1481,7 @@ project(':group-coordinator') { testImplementation libs.junitJupiter testImplementation libs.mockitoCore - testRuntimeOnly libs.slf4jReload4j - testRuntimeOnly libs.junitPlatformLanucher + testRuntimeOnly runtimeTestLibs generator project(':generator') } @@ -1538,8 +1542,8 @@ project(':test-common') { implementation libs.slf4jApi testImplementation libs.junitJupiter testImplementation libs.mockitoCore - testRuntimeOnly libs.slf4jReload4j - testRuntimeOnly libs.junitPlatformLanucher + + testRuntimeOnly runtimeTestLibs } sourceSets { @@ -1681,8 +1685,7 @@ project(':coordinator-common') { testImplementation libs.junitJupiter testImplementation libs.mockitoCore - testRuntimeOnly libs.slf4jReload4j - testRuntimeOnly libs.junitPlatformLanucher + testRuntimeOnly runtimeTestLibs } sourceSets { @@ -1733,8 +1736,7 @@ project(':share-coordinator') { testImplementation libs.junitJupiter testImplementation libs.mockitoCore - testRuntimeOnly libs.slf4jReload4j - testRuntimeOnly libs.junitPlatformLanucher + testRuntimeOnly runtimeTestLibs generator project(':generator') } @@ -1848,10 +1850,9 @@ project(':clients') { testImplementation libs.mockitoCore testImplementation libs.mockitoJunitJupiter // supports MockitoExtension - testRuntimeOnly libs.slf4jReload4j testRuntimeOnly libs.jacksonDatabind testRuntimeOnly libs.jacksonJDK8Datatypes - testRuntimeOnly libs.junitPlatformLanucher + testRuntimeOnly runtimeTestLibs generator project(':generator') } @@ -2016,8 +2017,7 @@ project(':raft') { testImplementation libs.jqwik testImplementation libs.hamcrest - testRuntimeOnly libs.slf4jReload4j - testRuntimeOnly libs.junitPlatformLanucher + testRuntimeOnly runtimeTestLibs generator project(':generator') } @@ -2112,8 +2112,7 @@ project(':server-common') { testImplementation libs.mockitoCore testImplementation libs.hamcrest - testRuntimeOnly libs.slf4jReload4j - testRuntimeOnly libs.junitPlatformLanucher + testRuntimeOnly runtimeTestLibs } task createVersionFile() { @@ -2171,8 +2170,7 @@ project(':storage:storage-api') { testImplementation libs.junitJupiter testImplementation libs.mockitoCore - testRuntimeOnly libs.slf4jReload4j - testRuntimeOnly libs.junitPlatformLanucher + testRuntimeOnly runtimeTestLibs } task createVersionFile() { @@ -2261,8 +2259,7 @@ project(':storage') { testImplementation libs.mockitoCore testImplementation libs.bcpkix - testRuntimeOnly libs.slf4jReload4j - testRuntimeOnly libs.junitPlatformLanucher + testRuntimeOnly runtimeTestLibs generator project(':generator') } @@ -2513,8 +2510,7 @@ project(':trogdor') { testImplementation project(':clients').sourceSets.test.output testImplementation libs.mockitoCore - testRuntimeOnly libs.slf4jReload4j - testRuntimeOnly libs.junitPlatformLanucher + testRuntimeOnly runtimeTestLibs } javadoc { @@ -2561,8 +2557,7 @@ project(':shell') { testImplementation project(':server-common').sourceSets.test.output testImplementation libs.junitJupiter - testRuntimeOnly libs.slf4jReload4j - testRuntimeOnly libs.junitPlatformLanucher + testRuntimeOnly runtimeTestLibs } javadoc { @@ -2627,8 +2622,7 @@ project(':streams') { testImplementation project(':group-coordinator') testRuntimeOnly project(':streams:test-utils') - testRuntimeOnly libs.slf4jReload4j - testRuntimeOnly libs.junitPlatformLanucher + testRuntimeOnly runtimeTestLibs generator project(':generator') } @@ -2779,8 +2773,7 @@ project(':streams:streams-scala') { testImplementation libs.mockitoCore testImplementation libs.mockitoJunitJupiter // supports MockitoExtension testImplementation libs.hamcrest - testRuntimeOnly libs.slf4jReload4j - testRuntimeOnly libs.junitPlatformLanucher + testRuntimeOnly runtimeTestLibs } javadoc { @@ -2832,8 +2825,7 @@ project(':streams:test-utils') { testImplementation libs.mockitoCore testImplementation libs.hamcrest - testRuntimeOnly libs.slf4jReload4j - testRuntimeOnly libs.junitPlatformLanucher + testRuntimeOnly runtimeTestLibs } tasks.create(name: "copyDependantLibs", type: Copy) { @@ -3366,9 +3358,9 @@ project(':connect:api') { implementation libs.jaxrsApi testImplementation libs.junitJupiter - testRuntimeOnly libs.junitPlatformLanucher - testRuntimeOnly libs.slf4jReload4j testImplementation project(':clients').sourceSets.test.output + + testRuntimeOnly runtimeTestLibs } javadoc { @@ -3402,9 +3394,9 @@ project(':connect:transforms') { testImplementation libs.junitJupiter - testRuntimeOnly libs.slf4jReload4j - testRuntimeOnly libs.junitPlatformLanucher testImplementation project(':clients').sourceSets.test.output + + testRuntimeOnly runtimeTestLibs } javadoc { @@ -3442,9 +3434,9 @@ project(':connect:json') { testImplementation libs.junitJupiter - testRuntimeOnly libs.slf4jReload4j - testRuntimeOnly libs.junitPlatformLanucher testImplementation project(':clients').sourceSets.test.output + + testRuntimeOnly runtimeTestLibs } javadoc { @@ -3522,9 +3514,8 @@ project(':connect:runtime') { testImplementation libs.mockitoJunitJupiter testImplementation libs.httpclient - testRuntimeOnly libs.slf4jReload4j testRuntimeOnly libs.bcpkix - testRuntimeOnly libs.junitPlatformLanucher + testRuntimeOnly runtimeTestLibs } javadoc { @@ -3621,15 +3612,14 @@ project(':connect:file') { testImplementation libs.junitJupiter testImplementation libs.mockitoCore - - testRuntimeOnly libs.slf4jReload4j - testRuntimeOnly libs.junitPlatformLanucher testImplementation project(':clients').sourceSets.test.output testImplementation project(':connect:runtime') testImplementation project(':connect:runtime').sourceSets.test.output testImplementation project(':core') testImplementation project(':test-common') testImplementation project(':server-common').sourceSets.test.output + + testRuntimeOnly runtimeTestLibs } javadoc { @@ -3667,9 +3657,8 @@ project(':connect:basic-auth-extension') { testImplementation libs.junitJupiter testImplementation project(':clients').sourceSets.test.output - testRuntimeOnly libs.slf4jReload4j testRuntimeOnly libs.jerseyContainerServlet - testRuntimeOnly libs.junitPlatformLanucher + testRuntimeOnly runtimeTestLibs } javadoc { @@ -3728,9 +3717,8 @@ project(':connect:mirror') { testImplementation project(':server-common').sourceSets.test.output testRuntimeOnly project(':connect:runtime') - testRuntimeOnly libs.slf4jReload4j testRuntimeOnly libs.bcpkix - testRuntimeOnly libs.junitPlatformLanucher + testRuntimeOnly runtimeTestLibs } javadoc { @@ -3792,8 +3780,7 @@ project(':connect:mirror-client') { testImplementation libs.junitJupiter testImplementation project(':clients').sourceSets.test.output - testRuntimeOnly libs.slf4jReload4j - testRuntimeOnly libs.junitPlatformLanucher + testRuntimeOnly runtimeTestLibs } javadoc {