https://kotlinlang.org logo
Title
p

philglass

12/14/2021, 11:30 AM
Has anyone tried writing tests for incremental scenarios? I don’t think it’s currently possible with
kotlin-compile-testing
(e.g. it fully wipes output directories on each KSP run, and a bunch of the KSP incremental behaviour is implemented by the Gradle plugin rather than the compiler plugin). Is my best bet more of an integration test, maybe using Gradle TestKit?
j

Jiaxiang

12/15/2021, 6:34 PM
we have some integration tests for incremental scenario in KSP code, we use gradle runner to simulate incremental scenarios, hope this can help.
p

philglass

12/17/2021, 4:13 PM
Ah yeah that’s helpful, thanks! I need to figure out how to inject my real symbol processor into the test rather than one from a module in the test project, but that seems doable, probably with an included build.