From 1709de6705f5927d887c0b06a37677860a80332d Mon Sep 17 00:00:00 2001 From: Ewen Cheslack-Postava Date: Mon, 2 Apr 2018 20:43:00 -0700 Subject: [PATCH] MINOR: Make kafka-streams-test-utils dependencies work with releases tarballs --- build.gradle | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index e090f52741477..22c4c2991b089 100644 --- a/build.gradle +++ b/build.gradle @@ -968,9 +968,18 @@ project(':streams:test-utils') { archivesBaseName = "kafka-streams-test-utils" dependencies { - compile project(':streams').sourceSets.main.output + // 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(':clients') + testCompile project(':streams') testCompile project(':clients').sourceSets.test.output testCompile libs.junit testCompile libs.rocksDBJni