assertk
assertk copied to clipboard
"Unresolved reference: assertThat" on 0.26.1
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?
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.
Credit where it's due: https://github.com/InsertKoinIO/koin/issues/1450
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.