kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject [kafka] branch trunk updated: MINOR: fix streams test-utils dependencies (#4821)
Date Thu, 05 Apr 2018 01:54:46 GMT
This is an automated email from the ASF dual-hosted git repository.

guozhang 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 d5db4e9  MINOR: fix streams test-utils dependencies (#4821)
d5db4e9 is described below

commit d5db4e9b8055536bdbb3b2d2308e36efa4abafcc
Author: John Roesler <vvcephei@users.noreply.github.com>
AuthorDate: Wed Apr 4 20:54:40 2018 -0500

    MINOR: fix streams test-utils dependencies (#4821)
    Reviewers: Bill Bejeck <bill@confluent.io>, Matthias J. Sax <matthias@confluent.io>,
Guozhang Wang <wangguoz@gmail.com>
 build.gradle | 17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)

diff --git a/build.gradle b/build.gradle
index 22c4c29..33fa7a7 100644
--- a/build.gradle
+++ b/build.gradle
@@ -920,10 +920,11 @@ project(':streams') {
     compile libs.slf4jApi
     compile libs.rocksDBJni
+    // testCompileOnly prevents streams from exporting a dependency on test-utils, which
would cause a dependency cycle
+    testCompileOnly project(':streams:test-utils')
     testCompile project(':clients').sourceSets.test.output
     testCompile project(':core')
     testCompile project(':core').sourceSets.test.output
-    testCompile project(':streams:test-utils').sourceSets.main.output
     testCompile libs.junit
     testCompile libs.easymock
     testCompile libs.bcpkix
@@ -968,21 +969,11 @@ project(':streams:test-utils') {
   archivesBaseName = "kafka-streams-test-utils"
   dependencies {
-    // streams and streams-test-utils have a circular dependency that needs to be broken.
Making streams a regular
-    // compile dependency here is a circular dependency. Making the streams project's main
sourceSet output a dependency
-    // incorrectly includes raw class files as dependencies and ends up including them in
output like the release tgz.
-    // Making the main sourceSet's output a compileOnly (provided) dependency resolves the
circular dependency in gradle
-    // and also leaves the raw class files out of the output. This does require that users
of this jar specify the
-    // streams dependency separately, but they wouldn't be using this module in tests unless
they already had a
-    // compile dependency on streams. For this module, however, we need to also include streams
as a separate test
-    // dependency since it is compileOnly/provided for the compile phase.
-    compileOnly project(':streams').sourceSets.main.output
+    compile project(':streams')
     compile project(':clients')
-    testCompile project(':streams')
     testCompile project(':clients').sourceSets.test.output
     testCompile libs.junit
-    testCompile libs.rocksDBJni
     testRuntime libs.slf4jlog4j
@@ -1014,8 +1005,8 @@ project(':streams:examples') {
     compile project(':connect:json')  // this dependency should be removed after we unify
data API
     compile libs.slf4jlog4j
-    testCompile project(':clients').sourceSets.test.output // for org.apache.kafka.test.IntegrationTest
     testCompile project(':streams:test-utils')
+    testCompile project(':clients').sourceSets.test.output // for org.apache.kafka.test.IntegrationTest
     testCompile libs.junit

To stop receiving notification emails like this one, please contact

View raw message