Hello everyone. Since mocking is next to impossibl...
# arrow-meta
c
Hello everyone. Since mocking is next to impossible in Kotlin native, the next best option is to write mocks by hand. I'm looking to lean on compiler Plugin to automate this. The idea is to generate code only for the
commonTest
dependency. I'm aware there will be limitations with this compared to mocking frameworks. I'm a complete newbie when it comes to compiler plugins and arrow meta. I've watched a few conference talks on the topic but that's about it. My question is: Is everything required for such a plugin already available? Or is it better to wait until 1.4? For example, I think IR might not be needed in this case because it looks like I want my plugin to generate Kotlin code. Also, how about an IDE plugin? Would that be required for this scenario?
r
You can use Transform.newSources to make it behave like kapt and disable IR codegen
then generate mocks automatically for anything in the main sources or whatever you are looking to compile
c
Great, I'll look into this. Thanks a bunch