@@ -44,6 +44,26 @@ var KotlinCompilation.kspArgs: MutableMap<String, String>
4444 registrar.options = value
4545 }
4646
47+ /* *
48+ * Controls for enabling incremental processing in KSP.
49+ */
50+ var KotlinCompilation .kspIncremental: Boolean
51+ get() = getKspRegistrar().incremental
52+ set(value) {
53+ val registrar = getKspRegistrar()
54+ registrar.incremental = value
55+ }
56+
57+ /* *
58+ * Controls for enabling incremental processing logs in KSP.
59+ */
60+ var KotlinCompilation .kspIncrementalLog: Boolean
61+ get() = getKspRegistrar().incrementalLog
62+ set(value) {
63+ val registrar = getKspRegistrar()
64+ registrar.incrementalLog = value
65+ }
66+
4767private val KotlinCompilation .kspJavaSourceDir: File
4868 get() = kspSourcesDir.resolve(" java" )
4969
@@ -100,6 +120,9 @@ private class KspCompileTestingComponentRegistrar(
100120
101121 var options: MutableMap <String , String > = mutableMapOf ()
102122
123+ var incremental: Boolean = false
124+ var incrementalLog: Boolean = false
125+
103126 override fun registerProjectComponents (project : MockProject , configuration : CompilerConfiguration ) {
104127 if (processors.isEmpty()) {
105128 return
@@ -109,6 +132,9 @@ private class KspCompileTestingComponentRegistrar(
109132
110133 this .processingOptions.putAll(compilation.kspArgs)
111134
135+ this .incremental = this @KspCompileTestingComponentRegistrar.incremental
136+ this .incrementalLog = this @KspCompileTestingComponentRegistrar.incrementalLog
137+
112138 this .cachesDir = compilation.kspCachesDir.also {
113139 it.deleteRecursively()
114140 it.mkdirs()
0 commit comments