Documentation

Setup

src/main/resources/META-INF/services/com.google.devtools.ksp.processing.SymbolProcessorProvider
com.my.package.processor.MySymbolProcessorProvider

Dependency

LEnk is just a name for the project
plugins {
id("com.android.application")
id("kotlin-android")
id("com.google.devtools.ksp")
}
ksp {
arg("verbose", "true")
}

Processor

Mind Map

Taken from https://github.com/google/ksp#how-ksp-looks-at-source-files

Visitors

override fun visitClassDeclaration(classDeclaration: KSClassDeclaration, data: FuncSpec) {
val functionSpecs = classDeclaration.getDeclaredFunctions()
.toSet()
.map {
it.accept(MyFunctionVisitor(resolver), it)
}
return
functionSpecs
}

KotlinPoet interop

Other

Knitting code. One line at a time. @ WS Audiology