Open vinaygaba opened 4 years ago
I think the logic you are trying to test happens on the Gradle level outside the scope of KotlinCompilation
. K2JVMCompiler
has no concept of modules (beyond project jigsaw) as far as I know, so you'd have to take a look at how Gradle deals with modules and then emulate that with separate KotlinCompilation
s. That would be very useful as an addon to KotlinCompilation
(I can assist you if you want to go that route). Or you can try to create a Gradle project on-the-fly and then run that but you'd lose all the benefits that Kotlin-Compile-Testing provides.
Thanks for your reply! I'll have to do a bit of reading to completely wrap my head around how all this fits together. Would appreciate if you have any pointers I could use!
AFAIK this stuff is completely undocumented and only passed on from person to person, so you will have to read the source code of the Kotlin Gradle Plugin or ask the authors. This could be useful as well: https://github.com/facebook/buck/tree/master/src/com/facebook/buck/jvm/kotlin
Thank you for the recommendation!
I am trying to add module support in this library: bennyhuo/kotlin-compile-testing-extensions, and it is used in bennyhuo/Mixin with a test data file Modules.kt.
Not an issue per se but I was wondering how I can emulate a multi-module annotation processing setup where the processing runs separately for each module. I'd like to have some tests for this in particular as it's critical for my use case. Is this something that is already supported?