Kotlin+Gradle: Unresolved reference: assertThatJson
See original GitHub issueHi,
I’m using JsonUnit+AssertJ in a Kotlin+Gradle project and I’m getting this error:
$ ./gradlew test
> Task :compileTestKotlin FAILED
e: /private/tmp/DataClassKonverter/src/test/kotlin/MainKtTest.kt: (4, 40): Unresolved reference: assertThatJson
e: /private/tmp/DataClassKonverter/src/test/kotlin/MainKtTest.kt: (23, 9): Unresolved reference: assertThatJson
e: /private/tmp/DataClassKonverter/src/test/kotlin/MainKtTest.kt: (24, 13): Unresolved reference: isObject
e: /private/tmp/DataClassKonverter/src/test/kotlin/MainKtTest.kt: (25, 13): Unresolved reference: node
e: /private/tmp/DataClassKonverter/src/test/kotlin/MainKtTest.kt: (26, 13): Unresolved reference: node
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileTestKotlin'.
> Compilation error. See log for more details
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
1 actionable task: 1 executed
I have this in my dependencies:
implementation("net.javacrumbs.json-unit:json-unit-assertj:2.19.0")
Please also find an example project attached.
Not sure if it’s similar to #293.
EDIT Fixed and re-uploaded example project.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Unresolved reference kotlintest while using gradle kotlin dsl
I get the following error : Task with name 'test' not found in project ':app'. My settings.gradle.kts : include(" ...
Read more >"Unresolved reference: Kotlin" when compiling proto #536
Hey, there have been a few issues regarding this topic (example), however the solutions haven't worked for me. I have a foo proto...
Read more >2020.3+: Unresolved reference to Kotlin stdlib function
I encountered the unresolved functions part (println, readText) loading an older project using Kotlin 1.3. x (Gradle) in IDEA with plugin from 1.4...
Read more >Unresolved Reference - Unable to unit test the gradle plugin
Hi folks! So I'm working on a few of the gradle plugin bugs and unfortunately I've noticed that the build does not allow...
Read more >Unresolved reference: enableAssertions - SQA Stack Exchange
But how would I enable the flag through kotlin gradle DSL? Java SE assertions: docs.oracle.com/javase/7/docs/technotes/guides/language/… – ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fixed in 2.21.0
You, are right, it does not work.