assertk icon indicating copy to clipboard operation
assertk copied to clipboard

"Unresolved reference: assertThat" on 0.26.1

Open dirkluijk opened this issue 2 years ago • 4 comments

When upgrading from version 0.25.0 to 0.26.1, I suddenly get this weird compiler error:

/path/to/Test.kt:73:9
Kotlin: Unresolved reference: assertThat

my code just imports

import assertk.assertThat
import assertk.assertions.*

Is the artifact broken?

dirkluijk avatar Jun 07 '23 09:06 dirkluijk

I had the same issue, found the solution on another project with which I also had the issue. If you use Maven, use assertk-jvm instead of assertk as artifactId.

Gradle is able to select the correct multi-platform dependency, Maven isn't.

esiha avatar Jun 16 '23 09:06 esiha

Credit where it's due: https://github.com/InsertKoinIO/koin/issues/1450

esiha avatar Jun 16 '23 09:06 esiha

I am using

<dependency>
    <groupId>com.willowtreeapps.assertk</groupId>
    <artifactId>assertk-jvm</artifactId>
    <version>0.26.1</version>
    <scope>test</scope>
</dependency>

and the problem still persists.

dirkluijk avatar Jun 19 '23 08:06 dirkluijk