Hi everyone! In my gradle plugin, I'm trying to replace the test tasks created for all targets by the Kotlin Multiplatform with my own implementations of AbstractTestTask/TestExecutionSpec/TestExecutor. Does anyone can hint me on how I can inform the Kotlin Gradle plugin to use my own Test tasks? Thanks in advance.
v
Vampire
10/30/2022, 9:52 PM
You could for example make the standard tasks depend on your own tasks and set
onlyIf { false }
on the standard tasks.
d
Didier Villevalois
10/31/2022, 10:11 AM
I see. I'll try doing that now, but I hoped for some extension points in the Kotlin Multiplatform Gradle plugin...
v
Vampire
10/31/2022, 10:14 AM
I don't know the KMP plugin, but I doubt there is anything.
Usually you configure existing tasks to your liking and not replace tasks with own tasks.
But I might be wrong of course.
d
Didier Villevalois
10/31/2022, 12:07 PM
Well, to be precise, I hoped for something similar to `Test`'s
useTestFramework(...)
, but for Kotlin Multiplatform Gradle plugin...
t
tapchicoma
10/31/2022, 9:08 PM
please open a new issue with your use-case - why you need to replace MPP test tasks