November 2018
Intermediate to advanced
388 pages
9h 5m
English
We can use the Xplugin option to enable the kotlin-sam-with-receiver plugin. We need to point to the sam-with-receiver-compiler-plugin jar that is available in the Kotlin compiler distribution. We can then specify a list of custom annotations as follows:
-Xplugin=$KOTLIN_HOME/lib/sam-with-receiver-compiler-plugin.jar-P plugin:org.jetbrains.kotlin.samWithReceiver:annotation=org.rao.kotlin.MySamInterface
Read now
Unlock full access