Are there any plans to create/support test fixture...
# gradle
h
Are there any plans to create/support test fixtures like java-test-fixtures for Kotlin? The current workaround is using another Gradle module.
plus1 1
j
There is a closed issue in YouTrack. I still don't understand why it is closed as it is marked as a problem with AGP interop, but I don't think fixtures work on KMP without Android (or maybe I am wrong).
w
Test fixtures with Kotlin do work in regular non-kmp Kotlin modules — we've been using them for quite a while now. Test fixtures do not work with Android modules, and that's an issue with AGP, to be solved on Google side: https://issuetracker.google.com/issues/139438142 I don't know what's the status on the multiplatform side 🤔
h
Yes, Kotlin/JVM does work well with Java test fixtures, I mean Kotlin MPP, mostly Kotlin JS, to share Kotlin common code as test fixtures.
plus1 1
j
but if KMP is not working, this shouldn't be closed, cc @tapchicoma
w
But I'd say it might be a good idea to open a new issue with an explicit request and sample use case, I see people mostly commenting in other issues about lack of kmm support
h
I also found this ticket: https://youtrack.jetbrains.com/issue/KT-35073/Support-dependencies-on-commonTest-and-other-non-published-common-source-sets-from-another-Gradle-project-in-MPP which matches the
java-test-fixtures
. So we "only" need a
kotlin-test-fixtures
plugin.
t
I would suggest open a new issue specifically for JS and Native test-fixtures