add spek2 dependency directly to bundle

configuring via smoke-test was a bad idea as they are only activated
with jdk >= 9 (so not for jdk8)
This commit is contained in:
Robert Stoll
2020-03-14 21:32:04 +01:00
parent f36378721b
commit 91e7332f51
3 changed files with 16 additions and 19 deletions

View File

@@ -99,6 +99,16 @@ buildscript {
}
}
}
//TODO dependencies no longer required once all specs are with spek2 where they are set via spek plugin
spekDep = { closure ->
delegate = closure
testRuntimeOnly "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
testRuntimeOnly "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
testImplementation "org.spekframework.spek2:spek-dsl-jvm:$spek2_version", excludeKotlin
testRuntimeOnly "org.spekframework.spek2:spek-runner-junit5:$spek2_version", excludeKotlin
}
}
repositories {
@@ -329,15 +339,6 @@ apply from: 'gradle/scripts/jacoco-multi-project.gradle'
configure(bundleSmokeTests) {
//TODO dependencies no longer required once all specs are with spek2 where they are set via spek plugin
def spekDep = { closure ->
delegate = closure
testRuntimeOnly "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
testRuntimeOnly "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
testImplementation "org.spekframework.spek2:spek-dsl-jvm:$spek2_version", excludeKotlin
testRuntimeOnly "org.spekframework.spek2:spek-runner-junit5:$spek2_version", excludeKotlin
}
def suffix = "-smoke-test"
def isABundleAndNotExtensionSmokeTest = it.name.endsWith(suffix)
if (isABundleAndNotExtensionSmokeTest) {
@@ -362,16 +363,6 @@ configure(bundleSmokeTests) {
//TODO remove once all specs are with spek2 where they are set via spek plugin
spekDep(delegate)
}
//TODO remove once all specs are with spek2 where they are set via spek plugin
bundle.dependencies {
spekDep(delegate)
}
//TODO remove once all specs are with spek2 where they are set via spek plugin
if (!it.name.contains("-cc-") && System.getenv('CI')) {
project(":$bundleUnderTest-android").dependencies {
spekDep(delegate)
}
}
} else {
//TODO remove once all specs are with spek2 where they are set via spek plugin
dependencies {

View File

@@ -10,6 +10,9 @@ dependencies {
runtimeOnly prefixedProject('domain-robstoll-android')
runtimeOnly prefixedProject('core-robstoll-android')
//TODO remove once all specs are with spek2 where they are set via spek plugin
spekDep(delegate)
}
srcAndResourcesFromJvmProject(project)

View File

@@ -10,4 +10,7 @@ dependencies {
runtimeOnly prefixedProject('domain-robstoll-jvm')
runtimeOnly prefixedProject('core-robstoll-jvm')
//TODO remove once all specs are with spek2 where they are set via spek plugin
spekDep(delegate)
}