gabrielfv
03/17/2021, 7:06 PMgabrielfv
03/17/2021, 7:07 PMgabrielfv
03/17/2021, 7:19 PMcompile(folder: File, vararg sourceFiles: SourceFile): KotlinCompilation.Result {
val processors = provider.provide()
val kspProcessors = processors.filterIsInstance<SymbolProcessor>()
val kaptProcessors = processors.filterIsInstance<BasicAnnotationProcessor>()
return KotlinCompilation()
.apply {
workingDir = folder
inheritClassPath = true
if (kspProcessors.isNotEmpty()) {
symbolProcessors = kspProcessors
} else if (kaptProcessors.isNotEmpty()) {
annotationProcessors = kaptProcessors.asProcessorList
}
sources = sourceFiles.asList()
verbose = false
kspIncremental = true
}.compile()
}
// ... during test
compile(temporaryFolder.root, SourceFile.kotlin(/* ... */))
yigit
03/17/2021, 11:48 PMTimo Gruen
03/18/2021, 10:55 AMTimo Gruen
03/18/2021, 10:55 AMTimo Gruen
03/18/2021, 12:37 PMgabrielfv
03/19/2021, 8:42 PMgabrielfv
03/19/2021, 8:45 PMyigit
03/19/2021, 10:25 PMyigit
03/19/2021, 10:25 PMyigit
03/19/2021, 10:26 PMgabrielfv
03/22/2021, 9:07 PM