~/talk

Writing Your First Kotlin Compiler Plugin

Talkat KotlinConf 2018 · 2018-10-03..10-05· [kotlin]
slides:none on file

Shows how to build and publish a real Kotlin compiler plugin as two modules: a Gradle sub-plugin wrapper and a Kotlin module implementing a command line processor and component registrar. Uses the Kotlin compiler embeddable API, registers a ClassBuilderInterceptorExtension, and emits JVM bytecode via objectweb ASM to inject entry/exit logging. The demo modifies a prime calculator, traces the 20,000th prime, prints parameter values and elapsed time (~6–7s), and shows packaging for Maven/JCenter so the plugin can be applied from Gradle.

AI-written summary · about

  1. 0:00Start
  2. 2:22Why write compiler plugins?
  3. 2:56Why NOT write compiler plugins?
  4. 4:00Examples of compiler plugins
  5. 6:21Plugin Architecture
  6. 26:49What does bytecode look like?
  7. 41:42Resources
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.