``` org.junit.platform.launcher.core.DefaultLaunch...
# spek
n
Copy code
org.junit.platform.launcher.core.DefaultLauncher handleThrowable
WARNING: TestEngine with ID 'spek2' failed to discover tests
java.lang.NoClassDefFoundError: kotlin/streams/jdk8/StreamsKt
when i just tried to upgrade the spek version
r
Can you include the build file?
n
build.gradle
it loads some subprojects as testDependencies so i can well.. test them and there is basically nothing else going on in the root project
r
You have to add a dependency to kotlin-stdlib since your excluding it from the spek dependencies
n
thencommenting out the exclude rules should fix it too ..
i just took the samples fro mthe website
i ended up needing a vers specific dependency on kotlin-stdlib-jdk8
this is what ended up working
Copy code
dependencies {
    testImplementation project(":voodoo")
    testImplementation (group: 'org.spekframework.spek2', name: 'spek-dsl-jvm', version: spek_version)  {
        exclude group: 'org.jetbrains.kotlin'
    }
    testRuntimeOnly (group: 'org.spekframework.spek2', name: 'spek-runner-junit5', version: spek_version) {
        exclude group: 'org.junit.platform'
        exclude group: 'org.jetbrains.kotlin'
    }
    testImplementation group: 'org.jetbrains.kotlin', name: 'kotlin-test', version: kotlin_version
    testImplementation group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib-jdk8', version: kotlin_version

    // <https://mvnrepository.com/artifact/org.junit.platform/junit-platform-engine>
    testImplementation group: 'org.junit.platform', name: 'junit-platform-engine', version: '1.3.0-RC1'

    // spek requires kotlin-reflect, can be omitted if already in the classpath
    testRuntimeOnly group: 'org.jetbrains.kotlin', name: 'kotlin-reflect', version: kotlin_version
}
r
You're missing this one:
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
which is stated on the website.
n
i tied that but it would fail at runtime.. apparently spek can then not find the jdk8 streams at runtime
r
ahh, yes - my bad. That should be
kotlin-stdlib-jdk8
now.
n
but i am fine with
testImplementation group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib-jdk8', version: kotlin_version
since the root project really does not need to produce artifacts