From aa3ac75470f28ce4292e6c3fbb8a6427472a6d32 Mon Sep 17 00:00:00 2001 From: str4d Date: Wed, 25 Jun 2014 02:50:24 +0000 Subject: [PATCH] Gradle test config improvements --- apps/i2ptunnel/build.gradle | 1 - apps/ministreaming/build.gradle | 13 ++++++++++++- apps/sam/build.gradle | 1 - apps/streaming/build.gradle | 2 +- build.gradle | 13 +++++++++---- core/build.gradle | 12 ++++++++++-- router/build.gradle | 2 +- 7 files changed, 33 insertions(+), 11 deletions(-) diff --git a/apps/i2ptunnel/build.gradle b/apps/i2ptunnel/build.gradle index 1b5dde3ba..54de8d7f1 100644 --- a/apps/i2ptunnel/build.gradle +++ b/apps/i2ptunnel/build.gradle @@ -17,7 +17,6 @@ dependencies { compile project(':core') providedCompile project(':apps:ministreaming') providedCompile project(':apps:jetty') - testCompile 'junit:junit:4.+' } war { diff --git a/apps/ministreaming/build.gradle b/apps/ministreaming/build.gradle index 43ecb50b3..4152fecf7 100644 --- a/apps/ministreaming/build.gradle +++ b/apps/ministreaming/build.gradle @@ -15,5 +15,16 @@ sourceSets { dependencies { compile project(':core') - testCompile 'junit:junit:4.+' +} + +configurations { + tests +} +task testJar(type: Jar) { + baseName = 'mstreaming-test' + dependsOn classes + from sourceSets.test.output +} +artifacts { + tests testJar } diff --git a/apps/sam/build.gradle b/apps/sam/build.gradle index d6fc75672..c3bf372a7 100644 --- a/apps/sam/build.gradle +++ b/apps/sam/build.gradle @@ -14,5 +14,4 @@ sourceSets { dependencies { compile project(':core') compile project(':apps:ministreaming') - testCompile 'junit:junit:4.+' } diff --git a/apps/streaming/build.gradle b/apps/streaming/build.gradle index 2d67f24aa..2f6d9199e 100644 --- a/apps/streaming/build.gradle +++ b/apps/streaming/build.gradle @@ -14,5 +14,5 @@ sourceSets { dependencies { compile project(':core') compile project(':apps:ministreaming') - testCompile 'junit:junit:4.+' + testCompile project(path: ':apps:ministreaming', configuration: 'tests') } diff --git a/build.gradle b/build.gradle index 14e2e73e1..0bf1b1182 100644 --- a/build.gradle +++ b/build.gradle @@ -1,14 +1,19 @@ subprojects { apply plugin: 'java' + repositories { + mavenCentral() + } + + + dependencies { + testCompile 'junit:junit:4.+' + } + sourceCompatibility = 1.5 jar { manifest { attributes 'Implementation-Version': '0.9.13-8' } } - - repositories { - mavenCentral() - } } diff --git a/core/build.gradle b/core/build.gradle index 009cd301f..912866f74 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -13,6 +13,14 @@ sourceSets { } } -dependencies { - testCompile 'junit:junit:4.+' +configurations { + tests +} +task testJar(type: Jar) { + baseName = 'i2p-test' + dependsOn classes + from sourceSets.test.output +} +artifacts { + tests testJar } diff --git a/router/build.gradle b/router/build.gradle index d90a1068e..b7cc9ffa8 100644 --- a/router/build.gradle +++ b/router/build.gradle @@ -13,5 +13,5 @@ sourceSets { dependencies { compile project(':core') - testCompile 'junit:junit:4.+' + testCompile project(path: ':core', configuration: 'tests') }