https://kotlinlang.org logo
Title
a

akowal

04/30/2020, 11:44 AM
if I only want to use kotest assertions in a jvm project, which dependencies should I include?
a

Ashish Kumar Joy

04/30/2020, 12:45 PM
Hi @akowal you will only need to add kotest-assertions-core-jvm your build tool will it self pull its all transitive dependencies.
a

akowal

04/30/2020, 12:46 PM
hey! as I mentioned below, the problem is that
kotest-assertions-core-jvm
 has runtime dependency on 
kotest-assertions-jvm
, so I get compilation errors
e.g.
io.kotest.matchers.ShouldKt#shouldBe
is contained in
kotest-assertions-jvm
a

Ashish Kumar Joy

04/30/2020, 12:48 PM
try this import io.kotest.matchers.collections.shouldContain
"should contain" {
    listOf(1, 2, 3) shouldContain 1
}
a

akowal

04/30/2020, 12:52 PM
yeah, it works because it's in
kotest-assertions-core-jvm
a

akowal

04/30/2020, 1:13 PM
here's minimal example to reproduce the issue
a

Ashish Kumar Joy

04/30/2020, 1:15 PM
Thanks i will look into it
a

akowal

04/30/2020, 1:17 PM
👍
a

Ashish Kumar Joy

04/30/2020, 1:31 PM
Thanks @akowal thats seems to be a bug. Weird part though is when
kotest-runner-junit5-jvm
is classpath that imports works. Could you please open a github issue for this.
a

akowal

04/30/2020, 1:32 PM
sure!
a

Ashish Kumar Joy

04/30/2020, 1:32 PM
Thanks
a

akowal

04/30/2020, 1:41 PM
check
#1425
l

LeoColman

04/30/2020, 2:47 PM
Add
io.kotest:kotest-assertions-jvm:version
as well
So
api "io.kotest:kotest-assertions-core-jvm:4.0.5"
api "io.kotest:kotest-assertions-jvm:4.0.5"
(Or implementation)