diff --git a/build.gradle b/build.gradle index afecfd8cf1..d172bda4fb 100644 --- a/build.gradle +++ b/build.gradle @@ -210,6 +210,8 @@ allprojects { } tasks.withType(Test) { + useJUnitPlatform() + failFast = project.hasProperty('tests.failFast') ? project.property('tests.failFast').toBoolean() : false // Prevent the project from creating temporary files outside of the build directory. diff --git a/client/jackson/build.gradle b/client/jackson/build.gradle index be0cca213f..e586479b80 100644 --- a/client/jackson/build.gradle +++ b/client/jackson/build.gradle @@ -20,11 +20,12 @@ dependencies { testCompile project(path: ':core', configuration: 'testArtifacts') testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}" + testImplementation "junit:junit:$junit_version" - testImplementation "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" + testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}" testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}" - + testCompile "org.jetbrains.kotlin:kotlin-test:$kotlin_version" } diff --git a/client/jfx/build.gradle b/client/jfx/build.gradle index d2aa470112..e1f6620860 100644 --- a/client/jfx/build.gradle +++ b/client/jfx/build.gradle @@ -45,11 +45,12 @@ dependencies { // Unit testing helpers. testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}" + testImplementation "junit:junit:$junit_version" - testImplementation "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" + testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}" testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}" - + testCompile "org.assertj:assertj-core:${assertj_version}" testCompile project(':test-utils') diff --git a/client/mock/build.gradle b/client/mock/build.gradle index 910a4edd43..3cebd33402 100644 --- a/client/mock/build.gradle +++ b/client/mock/build.gradle @@ -14,11 +14,12 @@ dependencies { compile project(':finance:contracts') testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}" + testImplementation "junit:junit:$junit_version" - testImplementation "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" + testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}" testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}" - + // Unit testing helpers. testCompile "org.assertj:assertj-core:${assertj_version}" diff --git a/client/rpc/build.gradle b/client/rpc/build.gradle index b734eabc55..8a650328d3 100644 --- a/client/rpc/build.gradle +++ b/client/rpc/build.gradle @@ -9,10 +9,10 @@ description 'Corda client RPC modules' //noinspection GroovyAssignabilityCheck configurations { integrationTestCompile.extendsFrom testCompile - integrationTestRuntime.extendsFrom testRuntime + integrationTestRuntimeOnly.extendsFrom testRuntimeOnly smokeTestCompile.extendsFrom compile - smokeTestRuntime.extendsFrom runtime + smokeTestRuntimeOnly.extendsFrom runtimeOnly } compileKotlin { @@ -74,12 +74,11 @@ dependencies { // For caches rather than guava compile "com.github.ben-manes.caffeine:caffeine:$caffeine_version" - testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}" + testImplementation "junit:junit:$junit_version" - testImplementation "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" - testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}" + testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}" - + // Unit testing helpers. testCompile "org.jetbrains.kotlin:kotlin-test:$kotlin_version" testCompile "org.assertj:assertj-core:${assertj_version}" @@ -96,7 +95,9 @@ dependencies { smokeTestCompile "org.apache.logging.log4j:log4j-core:$log4j_version" smokeTestCompile "org.jetbrains.kotlin:kotlin-test:$kotlin_version" smokeTestCompile "org.assertj:assertj-core:${assertj_version}" - smokeTestCompile "junit:junit:$junit_version" + smokeTestImplementation "junit:junit:$junit_version" + smokeTestRuntimeOnly "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" + smokeTestRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}" } task integrationTest(type: Test) { diff --git a/common/configuration-parsing/build.gradle b/common/configuration-parsing/build.gradle index 39eb327ab4..08137649c2 100644 --- a/common/configuration-parsing/build.gradle +++ b/common/configuration-parsing/build.gradle @@ -12,8 +12,9 @@ dependencies { compile project(":common-validation") testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}" + testImplementation "junit:junit:$junit_version" - testCompile "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" + testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}" testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}" @@ -27,4 +28,4 @@ jar { publish { name jar.baseName -} \ No newline at end of file +} diff --git a/confidential-identities/build.gradle b/confidential-identities/build.gradle index 01a0d2f18e..a9c7081bf8 100644 --- a/confidential-identities/build.gradle +++ b/confidential-identities/build.gradle @@ -13,8 +13,9 @@ dependencies { testCompile "org.jetbrains.kotlin:kotlin-test:$kotlin_version" testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}" + testImplementation "junit:junit:$junit_version" - testImplementation "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" + testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}" testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}" diff --git a/core-deterministic/testing/build.gradle b/core-deterministic/testing/build.gradle index d3933a91dc..2dcc5ea415 100644 --- a/core-deterministic/testing/build.gradle +++ b/core-deterministic/testing/build.gradle @@ -12,10 +12,13 @@ dependencies { transitive = false } - testCompile "org.apache.logging.log4j:log4j-slf4j-impl:$log4j_version" + testImplementation "org.slf4j:slf4j-api:$slf4j_version" + testRuntimeOnly "org.apache.logging.log4j:log4j-slf4j-impl:$log4j_version" testCompile "org.jetbrains.kotlin:kotlin-test:$kotlin_version" testCompile "org.assertj:assertj-core:$assertj_version" - testCompile "junit:junit:$junit_version" + testImplementation "junit:junit:$junit_version" + testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" + testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}" } // This module has no artifact and only contains tests. diff --git a/core-deterministic/testing/data/build.gradle b/core-deterministic/testing/data/build.gradle index 765aa27193..fe346ceff9 100644 --- a/core-deterministic/testing/data/build.gradle +++ b/core-deterministic/testing/data/build.gradle @@ -13,10 +13,9 @@ dependencies { testCompile "org.jetbrains.kotlin:kotlin-stdlib-jdk8" testCompile "org.jetbrains.kotlin:kotlin-reflect" - testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}" + testImplementation "junit:junit:$junit_version" - testImplementation "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" - testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}" + testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}" } diff --git a/core-deterministic/testing/verifier/build.gradle b/core-deterministic/testing/verifier/build.gradle index c3f5c6caa4..badbbce7a7 100644 --- a/core-deterministic/testing/verifier/build.gradle +++ b/core-deterministic/testing/verifier/build.gradle @@ -21,7 +21,7 @@ dependencies { // Compile against the deterministic artifacts to ensure that we use only the deterministic API subset. compileOnly configurations.deterministicArtifacts api "junit:junit:$junit_version" - api "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}" + runtimeOnly "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" } jar { diff --git a/core-deterministic/testing/verifier/src/main/kotlin/net/corda/deterministic/verifier/LocalSerializationRule.kt b/core-deterministic/testing/verifier/src/main/kotlin/net/corda/deterministic/verifier/LocalSerializationRule.kt index 68cafaee17..2b2dc2af91 100644 --- a/core-deterministic/testing/verifier/src/main/kotlin/net/corda/deterministic/verifier/LocalSerializationRule.kt +++ b/core-deterministic/testing/verifier/src/main/kotlin/net/corda/deterministic/verifier/LocalSerializationRule.kt @@ -1,6 +1,5 @@ package net.corda.deterministic.verifier -import net.corda.core.serialization.ClassWhitelist import net.corda.core.serialization.SerializationContext import net.corda.core.serialization.SerializationContext.UseCase.P2P import net.corda.core.serialization.SerializationCustomSerializer diff --git a/core/build.gradle b/core/build.gradle index 3f27a92c6b..d6975b0f30 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -11,10 +11,10 @@ evaluationDependsOn(':node:capsule') configurations { integrationTestCompile.extendsFrom testCompile - integrationTestRuntime.extendsFrom testRuntime + integrationTestRuntimeOnly.extendsFrom testRuntimeOnly smokeTestCompile.extendsFrom compile - smokeTestRuntime.extendsFrom runtime + smokeTestRuntimeOnly.extendsFrom runtimeOnly } sourceSets { @@ -56,10 +56,11 @@ processSmokeTestResources { dependencies { testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}" - testImplementation "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" + testImplementation "junit:junit:$junit_version" + testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}" testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}" - + testCompile "commons-fileupload:commons-fileupload:$fileupload_version" // Guava: Google test library (collections test suite) @@ -93,11 +94,12 @@ dependencies { // Smoke tests do NOT have any Node code on the classpath! smokeTestImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}" + smokeTestImplementation "junit:junit:$junit_version" - smokeTestCompile "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" + smokeTestRuntimeOnly "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" smokeTestRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}" smokeTestRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}" - + smokeTestCompile project(':smoke-test-utils') smokeTestCompile "org.assertj:assertj-core:${assertj_version}" @@ -138,7 +140,7 @@ jar { } configurations { - testArtifacts.extendsFrom testRuntime + testArtifacts.extendsFrom testRuntimeClasspath } task testJar(type: Jar) { diff --git a/experimental/avalanche/build.gradle b/experimental/avalanche/build.gradle index 09f09b9228..e6f9c1ccae 100644 --- a/experimental/avalanche/build.gradle +++ b/experimental/avalanche/build.gradle @@ -10,8 +10,9 @@ dependencies { compile "info.picocli:picocli:$picocli_version" testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}" + testImplementation "junit:junit:$junit_version" - testImplementation "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" + testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}" testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}" } diff --git a/experimental/behave/build.gradle b/experimental/behave/build.gradle index e2017ded0a..1a310bbcfa 100644 --- a/experimental/behave/build.gradle +++ b/experimental/behave/build.gradle @@ -65,8 +65,9 @@ dependencies { // Unit Tests testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}" + testImplementation "junit:junit:$junit_version" - testCompile "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" + testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}" testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}" diff --git a/experimental/build.gradle b/experimental/build.gradle index d68097a60e..e8b82c4b85 100644 --- a/experimental/build.gradle +++ b/experimental/build.gradle @@ -21,8 +21,9 @@ dependencies { compile "com.google.guava:guava:$guava_version" testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}" + testImplementation "junit:junit:$junit_version" - testImplementation "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" + testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}" testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}" testCompile project(':node-driver') diff --git a/experimental/corda-utils/build.gradle b/experimental/corda-utils/build.gradle index 8a5f44e734..89092ca3be 100644 --- a/experimental/corda-utils/build.gradle +++ b/experimental/corda-utils/build.gradle @@ -24,8 +24,9 @@ dependencies { testCompile project(':node-driver') testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}" + testImplementation "junit:junit:$junit_version" - testImplementation "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" + testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}" testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}" } diff --git a/finance/contracts/build.gradle b/finance/contracts/build.gradle index 5c516aae6b..384cf5e10a 100644 --- a/finance/contracts/build.gradle +++ b/finance/contracts/build.gradle @@ -15,8 +15,9 @@ dependencies { testCompile project(':test-utils') testCompile project(path: ':core', configuration: 'testArtifacts') testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}" + testImplementation "junit:junit:$junit_version" - testImplementation "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" + testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}" testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}" @@ -25,7 +26,7 @@ dependencies { } configurations { - testArtifacts.extendsFrom testRuntime + testArtifacts.extendsFrom testRuntimeClasspath } jar { diff --git a/finance/workflows/build.gradle b/finance/workflows/build.gradle index 94efb40b98..9885e5cc1f 100644 --- a/finance/workflows/build.gradle +++ b/finance/workflows/build.gradle @@ -22,6 +22,12 @@ sourceSets { } } +configurations { + testArtifacts.extendsFrom testRuntimeClasspath + integrationTestCompile.extendsFrom testCompile + integrationTestRuntimeOnly.extendsFrom testRuntimeOnly +} + dependencies { // Note: 3rd party CorDapps should remember to include the relevant Finance CorDapp dependencies using `cordapp` // cordapp project(':finance:workflows') @@ -36,10 +42,11 @@ dependencies { testCompile project(':test-utils') testCompile project(path: ':core', configuration: 'testArtifacts') - - testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}" - testImplementation "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" + testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}" + testImplementation "junit:junit:$junit_version" + + testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}" testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}" @@ -47,12 +54,6 @@ dependencies { testCompile "org.assertj:assertj-core:$assertj_version" } -configurations { - testArtifacts.extendsFrom testRuntime - integrationTestCompile.extendsFrom testCompile - integrationTestRuntime.extendsFrom testRuntime -} - task testJar(type: Jar) { classifier "tests" from sourceSets.test.output @@ -73,12 +74,6 @@ jar { reproducibleFileOrder = true } -configurations { - testArtifacts.extendsFrom testRuntime - integrationTestCompile.extendsFrom testCompile - integrationTestRuntime.extendsFrom testRuntime -} - cordapp { targetPlatformVersion corda_platform_version.toInteger() minimumPlatformVersion 1 diff --git a/node-api/build.gradle b/node-api/build.gradle index 92fe2b01ee..cec9eebfc5 100644 --- a/node-api/build.gradle +++ b/node-api/build.gradle @@ -39,8 +39,9 @@ dependencies { runtime 'com.mattbertolini:liquibase-slf4j:2.0.0' testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}" + testImplementation "junit:junit:$junit_version" - testImplementation "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" + testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}" testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}" // Unit testing helpers. @@ -55,7 +56,7 @@ dependencies { } configurations { - testArtifacts.extendsFrom testRuntime + testArtifacts.extendsFrom testRuntimeClasspath } task testJar(type: Jar) { diff --git a/node/build.gradle b/node/build.gradle index b5d4aa6026..203d7d64b9 100644 --- a/node/build.gradle +++ b/node/build.gradle @@ -24,7 +24,7 @@ description 'Corda node modules' //noinspection GroovyAssignabilityCheck configurations { integrationTestCompile.extendsFrom testCompile - integrationTestRuntime.extendsFrom testRuntime + integrationTestRuntimeOnly.extendsFrom testRuntimeOnly } sourceSets { @@ -129,11 +129,12 @@ dependencies { compile "com.typesafe:config:$typesafe_config_version" testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}" + testImplementation "junit:junit:$junit_version" - testImplementation "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" + testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}" testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}" - + // Unit testing helpers. testCompile "org.assertj:assertj-core:${assertj_version}" testCompile project(':test-utils') diff --git a/samples/attachment-demo/build.gradle b/samples/attachment-demo/build.gradle index 3f86cb6874..dfc441f308 100644 --- a/samples/attachment-demo/build.gradle +++ b/samples/attachment-demo/build.gradle @@ -27,7 +27,7 @@ sourceSets { configurations { integrationTestCompile.extendsFrom testCompile - integrationTestRuntime.extendsFrom testRuntime + integrationTestRuntimeOnly.extendsFrom testRuntimeOnly } dependencies { @@ -40,7 +40,7 @@ dependencies { // Cordformation needs a SLF4J implementation when executing the Network // Bootstrapper, but Log4J doesn't shutdown completely from within Gradle. // Use a much simpler SLF4J implementation here instead. - runtimeOnly "org.slf4j:slf4j-simple:$slf4j_version" + cordaRuntime "org.slf4j:slf4j-simple:$slf4j_version" // Corda integration dependencies cordaRuntime project(path: ":node:capsule", configuration: 'runtimeArtifacts') @@ -56,11 +56,12 @@ dependencies { } testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}" + testImplementation "junit:junit:$junit_version" - testImplementation "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" + testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}" testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}" - + testCompile "org.assertj:assertj-core:$assertj_version" integrationTestCompile project(':webserver') diff --git a/samples/bank-of-corda-demo/build.gradle b/samples/bank-of-corda-demo/build.gradle index 0471bc40ac..53b65dfce0 100644 --- a/samples/bank-of-corda-demo/build.gradle +++ b/samples/bank-of-corda-demo/build.gradle @@ -26,8 +26,9 @@ dependencies { // Test dependencies testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}" + testImplementation "junit:junit:$junit_version" - testImplementation "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" + testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}" testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}" } @@ -125,4 +126,4 @@ cordapp { version "1" vendor "R3" } -} \ No newline at end of file +} diff --git a/samples/irs-demo/build.gradle b/samples/irs-demo/build.gradle index 6fcca35c75..aa668c24f9 100644 --- a/samples/irs-demo/build.gradle +++ b/samples/irs-demo/build.gradle @@ -48,8 +48,8 @@ sourceSets { configurations { integrationTestCompile.extendsFrom testCompile - integrationTestRuntime.extendsFrom testRuntime - demoArtifacts.extendsFrom testRuntime + integrationTestRuntimeOnly.extendsFrom testRuntimeOnly + demoArtifacts.extendsFrom testRuntimeClasspath systemTestCompile.extendsFrom testCompile } @@ -71,11 +71,12 @@ dependencies { testCompile project(':node-driver') testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}" + testImplementation "junit:junit:$junit_version" - testImplementation "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" + testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}" testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}" - + testCompile "org.assertj:assertj-core:${assertj_version}" integrationTestCompile project(path: ":samples:irs-demo:web", configuration: "demoArtifacts") diff --git a/samples/irs-demo/cordapp/build.gradle b/samples/irs-demo/cordapp/build.gradle index fb7be3f848..bf6c020cdf 100644 --- a/samples/irs-demo/cordapp/build.gradle +++ b/samples/irs-demo/cordapp/build.gradle @@ -32,7 +32,7 @@ dependencies { // Corda integration dependencies cordaRuntime project(path: ":node:capsule", configuration: 'runtimeArtifacts') - runtimeOnly "org.slf4j:slf4j-simple:$slf4j_version" + cordaRuntime "org.slf4j:slf4j-simple:$slf4j_version" cordapp project(':samples:irs-demo:cordapp:contracts-irs') cordapp project(':samples:irs-demo:cordapp:workflows-irs') diff --git a/samples/irs-demo/cordapp/contracts-irs/build.gradle b/samples/irs-demo/cordapp/contracts-irs/build.gradle index c2db84e524..77e43fef34 100644 --- a/samples/irs-demo/cordapp/contracts-irs/build.gradle +++ b/samples/irs-demo/cordapp/contracts-irs/build.gradle @@ -12,8 +12,9 @@ dependencies { testCompile project(':node-driver') testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}" + testImplementation "junit:junit:$junit_version" - testImplementation "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" + testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}" testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}" } @@ -31,4 +32,4 @@ cordapp { jar { baseName 'corda-irs-demo-contracts' -} \ No newline at end of file +} diff --git a/samples/irs-demo/cordapp/workflows-irs/build.gradle b/samples/irs-demo/cordapp/workflows-irs/build.gradle index 579bc81a04..f140c3d4e1 100644 --- a/samples/irs-demo/cordapp/workflows-irs/build.gradle +++ b/samples/irs-demo/cordapp/workflows-irs/build.gradle @@ -4,7 +4,7 @@ apply plugin: 'net.corda.plugins.quasar-utils' apply plugin: 'net.corda.plugins.cordapp' configurations { - demoArtifacts.extendsFrom testRuntime + demoArtifacts.extendsFrom testRuntimeClasspath } dependencies { @@ -26,11 +26,12 @@ dependencies { testCompile project(':node-driver') testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}" + testImplementation "junit:junit:$junit_version" - testImplementation "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" + testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}" testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}" - + testCompile "org.assertj:assertj-core:${assertj_version}" cordapp project(':samples:irs-demo:cordapp:contracts-irs') @@ -59,4 +60,4 @@ task testJar(type: Jar) { artifacts { demoArtifacts testJar -} \ No newline at end of file +} diff --git a/samples/network-verifier/build.gradle b/samples/network-verifier/build.gradle index 2465cc78c5..f7582c0069 100644 --- a/samples/network-verifier/build.gradle +++ b/samples/network-verifier/build.gradle @@ -18,7 +18,7 @@ dependencies { // Cordformation needs a SLF4J implementation when executing the Network // Bootstrapper, but Log4J doesn't shutdown completely from within Gradle. // Use a much simpler SLF4J implementation here instead. - runtimeOnly "org.slf4j:slf4j-simple:$slf4j_version" + cordaRuntime "org.slf4j:slf4j-simple:$slf4j_version" // Corda integration dependencies cordaRuntime project(path: ":node:capsule", configuration: 'runtimeArtifacts') diff --git a/samples/notary-demo/build.gradle b/samples/notary-demo/build.gradle index d74a1d3fa2..b32344b049 100644 --- a/samples/notary-demo/build.gradle +++ b/samples/notary-demo/build.gradle @@ -23,7 +23,7 @@ dependencies { // Cordformation needs a SLF4J implementation when executing the Network // Bootstrapper, but Log4J doesn't shutdown completely from within Gradle. // Use a much simpler SLF4J implementation here instead. - runtimeOnly "org.slf4j:slf4j-simple:$slf4j_version" + cordaRuntime "org.slf4j:slf4j-simple:$slf4j_version" // Notary implementations cordapp project(':samples:notary-demo:contracts') diff --git a/samples/simm-valuation-demo/build.gradle b/samples/simm-valuation-demo/build.gradle index 9a929d56c7..44502d6063 100644 --- a/samples/simm-valuation-demo/build.gradle +++ b/samples/simm-valuation-demo/build.gradle @@ -22,7 +22,7 @@ sourceSets { configurations { integrationTestCompile.extendsFrom testCompile - integrationTestRuntime.extendsFrom testRuntime + integrationTestRuntimeOnly.extendsFrom testRuntimeOnly } dependencies { @@ -60,11 +60,12 @@ dependencies { testCompile project(':node-driver') testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}" + testImplementation "junit:junit:$junit_version" - testImplementation "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" + testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}" testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}" - + testCompile "org.assertj:assertj-core:$assertj_version" } diff --git a/samples/trader-demo/build.gradle b/samples/trader-demo/build.gradle index d73c3507d8..5eeea06740 100644 --- a/samples/trader-demo/build.gradle +++ b/samples/trader-demo/build.gradle @@ -25,7 +25,7 @@ sourceSets { configurations { integrationTestCompile.extendsFrom testCompile - integrationTestRuntime.extendsFrom testRuntime + integrationTestRuntimeOnly.extendsFrom testRuntimeOnly } dependencies { @@ -36,7 +36,7 @@ dependencies { // Cordformation needs a SLF4J implementation when executing the Network // Bootstrapper, but Log4J doesn't shutdown completely from within Gradle. // Use a much simpler SLF4J implementation here instead. - runtimeOnly "org.slf4j:slf4j-simple:$slf4j_version" + cordaRuntime "org.slf4j:slf4j-simple:$slf4j_version" // We only need this for its DUMMY_BANK constants, and // DO NOT want it added to Gradle's runtime classpath. @@ -57,11 +57,12 @@ dependencies { } testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}" + testImplementation "junit:junit:$junit_version" - testImplementation "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" + testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}" testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}" - + testCompile "org.assertj:assertj-core:$assertj_version" } diff --git a/samples/trader-demo/workflows-trader/build.gradle b/samples/trader-demo/workflows-trader/build.gradle index 28d467f7c5..668a69ee8c 100644 --- a/samples/trader-demo/workflows-trader/build.gradle +++ b/samples/trader-demo/workflows-trader/build.gradle @@ -13,11 +13,12 @@ dependencies { testCompile project(':node-driver') testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}" + testImplementation "junit:junit:$junit_version" - testImplementation "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" + testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}" testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}" - + testCompile "org.assertj:assertj-core:$assertj_version" } @@ -34,4 +35,4 @@ cordapp { vendor "R3" licence "Open Source (Apache 2)" } -} \ No newline at end of file +} diff --git a/serialization/build.gradle b/serialization/build.gradle index c1f184ac78..3630e06cfb 100644 --- a/serialization/build.gradle +++ b/serialization/build.gradle @@ -29,8 +29,9 @@ dependencies { compile "com.github.ben-manes.caffeine:caffeine:$caffeine_version" testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}" + testImplementation "junit:junit:$junit_version" - testImplementation "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" + testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}" testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}" @@ -40,7 +41,7 @@ dependencies { } configurations { - testArtifacts.extendsFrom testRuntime + testArtifacts.extendsFrom testRuntimeClasspath } task testJar(type: Jar) { diff --git a/testing/node-driver/build.gradle b/testing/node-driver/build.gradle index 82bf9c1154..985f4abdae 100644 --- a/testing/node-driver/build.gradle +++ b/testing/node-driver/build.gradle @@ -29,9 +29,10 @@ dependencies { // Integration test helpers testCompile "org.assertj:assertj-core:$assertj_version" + integrationTestImplementation "junit:junit:$junit_version" integrationTestImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}" - integrationTestImplementation "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" + integrationTestRuntimeOnly "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" integrationTestRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}" integrationTestRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}" diff --git a/testing/node-driver/src/integration-test/kotlin/net/corda/testing/driver/DriverTests.kt b/testing/node-driver/src/integration-test/kotlin/net/corda/testing/driver/DriverTests.kt index eab3ba4c16..9dec4b200e 100644 --- a/testing/node-driver/src/integration-test/kotlin/net/corda/testing/driver/DriverTests.kt +++ b/testing/node-driver/src/integration-test/kotlin/net/corda/testing/driver/DriverTests.kt @@ -18,7 +18,6 @@ import net.corda.testing.node.internal.addressMustNotBeBound import org.assertj.core.api.Assertions.* import org.json.simple.JSONObject import org.junit.Test -import java.io.RandomAccessFile import java.util.* import java.util.concurrent.CountDownLatch import java.util.concurrent.Executors diff --git a/testing/test-cli/build.gradle b/testing/test-cli/build.gradle index e49370c617..c79b4c3eef 100644 --- a/testing/test-cli/build.gradle +++ b/testing/test-cli/build.gradle @@ -11,7 +11,7 @@ dependencies { compile "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}" compile "junit:junit:${junit_version}" - testImplementation "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" + testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}" testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}" diff --git a/testing/test-common/build.gradle b/testing/test-common/build.gradle index 8fcb6e638a..82d3100a1b 100644 --- a/testing/test-common/build.gradle +++ b/testing/test-common/build.gradle @@ -10,11 +10,12 @@ dependencies { // Unit testing helpers. compile "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}" + compile "junit:junit:$junit_version" + + runtimeOnly "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" + runtimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}" + runtimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}" - testImplementation "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" - testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}" - testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}" - compile 'org.hamcrest:hamcrest-library:1.3' compile "com.nhaarman:mockito-kotlin:$mockito_kotlin_version" compile "org.mockito:mockito-core:$mockito_version" diff --git a/tools/demobench/build.gradle b/tools/demobench/build.gradle index 7760921d18..6f49779a74 100644 --- a/tools/demobench/build.gradle +++ b/tools/demobench/build.gradle @@ -74,14 +74,12 @@ dependencies { testCompile project(':test-utils') testCompile project(':webserver') - testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}" - - testImplementation "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" - testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}" + testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}" - + testCompile "org.jetbrains.kotlin:kotlin-test:$kotlin_version" testCompile "org.assertj:assertj-core:$assertj_version" + testCompile "junit:junit:$junit_version" } tasks.withType(JavaCompile) { diff --git a/tools/explorer/build.gradle b/tools/explorer/build.gradle index f2b55ee8b6..3c60f92709 100644 --- a/tools/explorer/build.gradle +++ b/tools/explorer/build.gradle @@ -8,12 +8,11 @@ mainClassName = 'net.corda.explorer.Main' dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}" + testImplementation "junit:junit:$junit_version" - testCompile "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" - testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}" + testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}" - + testCompile "org.jetbrains.kotlin:kotlin-test:$kotlin_version" // TornadoFX: A lightweight Kotlin framework for working with JavaFX UI's. @@ -68,4 +67,4 @@ jar { 'Automatic-Module-Name': 'net.corda.tools.explorer' ) } -} \ No newline at end of file +} diff --git a/tools/shell/build.gradle b/tools/shell/build.gradle index 4acae9e074..bce5a21798 100644 --- a/tools/shell/build.gradle +++ b/tools/shell/build.gradle @@ -8,7 +8,7 @@ description 'Corda Shell' configurations { integrationTestCompile.extendsFrom testCompile - integrationTestRuntime.extendsFrom testRuntime + integrationTestRuntimeOnly.extendsFrom testRuntimeOnly } sourceSets { @@ -54,10 +54,9 @@ dependencies { // For logging, required for ANSIProgressRenderer. compile "org.apache.logging.log4j:log4j-core:$log4j_version" - testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}" + testImplementation "junit:junit:$junit_version" - testImplementation "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" - testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}" + testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}" // Unit testing helpers. diff --git a/tools/worldmap/build.gradle b/tools/worldmap/build.gradle index e4618738e6..0558f837ba 100644 --- a/tools/worldmap/build.gradle +++ b/tools/worldmap/build.gradle @@ -4,9 +4,8 @@ dependencies { implementation project(':core') implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" testImplementation "org.jetbrains.kotlin:kotlin-test-junit" - testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}" + testImplementation "junit:junit:$junit_version" - testImplementation "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" - testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}" + testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}" -} \ No newline at end of file +} diff --git a/webserver/build.gradle b/webserver/build.gradle index 39b096d4ea..e060c66ef0 100644 --- a/webserver/build.gradle +++ b/webserver/build.gradle @@ -63,8 +63,9 @@ dependencies { integrationTestCompile project(':node-driver') testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}" + testImplementation "junit:junit:$junit_version" - testImplementation "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" + testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${junit_vintage_version}" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}" testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junit_platform_version}" }