I was wondering how most people setup there multip...
# multiplatform
m
I was wondering how most people setup there multiplatform projects? I would love to set it up with quality as a priority and not just an after thought. Still I do struggle with setting those things up. So I was wondering what kind of wizardry I am missing. for extra context which is out of scope: Currently trying to setup a multiplatform project with mutation testing, linting, formatter, test coverage, code scanning, mocking and more to create almost perfect tests and code. Since I am not a gradle wizard and libraries updating constantly and me not being able to read documentation properly I struggle a bit especially since it all needs to be multiplatform specific.
c
It's a very large topic, few thoughts; Mutation testing: • On the JVM: There is Pitest, but its Gradle integration is very poor • On JS: It's probably possible to use an existing JS framework, but that will probably lead to a ton of false positives as it will complain about things that the Kotlin compiler stops you from doing anyway • On Native: AFAIK it's not possible currently • The best solution would be to have a Kotlin compiler plugin that can add these at the IR phase so they work on all platforms. That would be a ton of work though. Linting/formatting: • KtLint and Detekt are quite popular. Personally I don't use them because I think they are too often pedantic about exact form in ways that make the content harder to understand. Test coverage: • On the JVM: Kover works great. • On JS: you can use any JS coverage tool you want but you'll have to do the Gradle integration yourself, and unless you manage to get source maps working, the reports will be hard to read. • On Native: I guess it should be possible to use existing native tools, but I don't know enough about them to really say. Code scanning: • I'm not sure I get what this is about. If you mean something like Sonarqube, IntelliJ's inspections do the job fine (look up Qodana if you want it in your CI) Mocking: • Use fakes!
👀 1
m
I tried setting up Pitest, Kover and sonarqube. Sadly since I’m not great at gradle and almost everything is written in commontest I just leave it be for now. I’ll just write my test without the analytics for now