Carrascado
07/27/2020, 5:24 PMsam
07/27/2020, 5:32 PMCarrascado
07/27/2020, 5:36 PMException in thread "main" java.lang.NoClassDefFoundError: io/github/classgraph/ClassGraph
at io.kotest.core.config.DetectConfigKt.detectConfig(detectConfig.kt:61)
at io.kotest.core.config.Project.<clinit>(Project.kt:45)
at io.kotest.core.engine.KotestEngine.<init>(KotestEngine.kt:53)
at io.kotest.core.engine.KotestEngineLauncher.launch(KotestEngineLauncher.kt:35)
at io.kotest.runner.console.KotestConsoleRunner.execute(KotestConsoleRunner.kt:22)
at io.kotest.runner.console.Execute.run(launcher.kt:66)
at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:154)
at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:14)
at com.github.ajalt.clikt.core.CliktCommand.parse(CliktCommand.kt:252)
at com.github.ajalt.clikt.core.CliktCommand.parse$default(CliktCommand.kt:249)
at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:267)
at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:290)
at io.kotest.runner.console.LauncherKt.main(launcher.kt:14)
Caused by: java.lang.ClassNotFoundException: io.github.classgraph.ClassGraph
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
... 13 more
Process finished with exit code 1
testImplementation 'org.jetbrains.kotlin:kotlin-reflect:1.3.72'
testImplementation 'io.kotest:kotest-runner-junit5-jvm:4.1.3'
testImplementation 'io.kotest:kotest-assertions-core-jvm:4.1.3'
testImplementation 'io.kotest:kotest-runner-console-jvm:4.1.3'
testImplementation 'io.kotest:kotest-property-jvm:4.1.3'
Exception in thread "main" java.lang.ClassNotFoundException: com.carrascado.pruebaskotest.ExampleKotest
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at io.kotest.runner.console.KotestConsoleRunner.execute(KotestConsoleRunner.kt:27)
at io.kotest.runner.console.Execute$run$1.invokeSuspend(launcher.kt:67)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:274)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:79)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:54)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:36)
at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
at io.kotest.runner.console.Execute.run(launcher.kt:51)
at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:154)
at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:14)
at com.github.ajalt.clikt.core.CliktCommand.parse(CliktCommand.kt:252)
at com.github.ajalt.clikt.core.CliktCommand.parse$default(CliktCommand.kt:249)
at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:267)
at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:290)
at io.kotest.runner.console.LauncherKt.main(launcher.kt:15)
sam
07/27/2020, 5:44 PMCarrascado
07/27/2020, 5:57 PMsam
07/27/2020, 5:57 PMCarrascado
07/27/2020, 5:58 PMapply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
defaultConfig {
applicationId "com.carrascado.pruebaskotest"
minSdkVersion 27
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), '<http://proguard-rules.pro|proguard-rules.pro>'
}
}
kotlinOptions {
jvmTarget = "1.8"
}
}
android.testOptions {
unitTests.all {
useJUnitPlatform()
}
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "org.jetbrains.kotlin:kotlin-stdlib:${kotlin_version}"
implementation 'androidx.core:core-ktx:1.3.1'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
testImplementation 'org.jetbrains.kotlin:kotlin-reflect:1.3.72'
testImplementation 'io.kotest:kotest-runner-junit5-jvm:4.1.2'
testImplementation 'io.kotest:kotest-assertions-core-jvm:4.1.2'
testImplementation 'io.kotest:kotest-runner-console-jvm:4.1.2'
testImplementation 'io.kotest:kotest-property-jvm:4.1.2'
// implementation "io.arrow-kt:arrow-core:0.10.4"
// implementation "io.arrow-kt:arrow-syntax:0.10.4"
// kapt "io.arrow-kt:arrow-meta:0.10.4"
}
sam
07/27/2020, 6:00 PMCarrascado
07/27/2020, 6:01 PMExampleKotest
right there, in the unit tests package, I don't know If that may be causing the problemtestImplementation 'junit:junit:4.13'
Since it's junit4 but later Kotest runs on JUnit5? (Btw I didn't know Kotest needed Junit to run)sam
07/27/2020, 6:08 PMCarrascado
07/27/2020, 6:09 PMsam
07/27/2020, 6:12 PMCarrascado
07/27/2020, 6:13 PMsam
07/27/2020, 6:14 PMCarrascado
07/27/2020, 6:15 PMsam
07/27/2020, 6:16 PMCarrascado
07/27/2020, 6:16 PMsam
07/27/2020, 6:16 PMCarrascado
07/27/2020, 6:16 PMsam
07/27/2020, 6:16 PMCarrascado
07/27/2020, 6:17 PMsam
07/27/2020, 6:18 PM