azkaban-aplcache

hiding internals of azkaban-db tests in other module (#1381) This

8/23/2017 1:58:43 PM

Details

diff --git a/azkaban-common/build.gradle b/azkaban-common/build.gradle
index 35c9e0c..02d2fde 100644
--- a/azkaban-common/build.gradle
+++ b/azkaban-common/build.gradle
@@ -67,7 +67,7 @@ dependencies {
     testRuntime deps.h2
 
     testCompile project(':test')
-    testCompile project(':azkaban-db').sourceSets.test.output
+    testCompile project(path: ':azkaban-db', configuration: 'testOutput')
 }
 
 tasks.withType(JavaCompile) {
diff --git a/azkaban-db/build.gradle b/azkaban-db/build.gradle
index 9031a77..97df2b4 100644
--- a/azkaban-db/build.gradle
+++ b/azkaban-db/build.gradle
@@ -16,6 +16,19 @@
  */
 apply plugin: 'distribution'
 
+task testJar(type: Jar, dependsOn: testClasses) {
+    from sourceSets.test.output
+    classifier = 'test'
+}
+
+configurations {
+    testOutput.extendsFrom (testCompile)
+}
+
+artifacts {
+    testOutput testJar
+}
+
 dependencies {
 
     // todo kunkun-tang: consolidate dependencies in azkaban-common and azkaban-db