Pavlo Stavytskyi

Software Engineer at Lyft

Talk Title

Advanced techniques for building Kotlin DSL(s)






09:00 > 40 min


on Twitter

How to create Kotlin DSL that looks like the syntax of a programming language? I would like to talk about advanced techniques for creating any kind of Kotlin DSL(s) in this talk. As an example, we will see how to build a DSL that looks like a Starlark programming language, a Python dialect used for writing build scripts for Bazel build system. This DSL is a declarative code generator that builds an abstract syntax tree of a Starlark language and then generates a formatted code based on it. However, all the concepts described in this talk are applicable to any kind of Kotlin DSL(s) including ones for Android projects. Such a DSL was briefly mentioned in my talk at droidcon SF 2022: However, In this talk, I would like to dive deeper into the implementation details of such a DSL to demonstrate some neat things Kotlin allows to achieve in this area.

Speaker Bio

Pavlo is a Google Developer Expert for Android and works at Lyft on mobile infrastructure. He develops Android apps, absolutely loves Kotlin language, works with build systems such as Gradle and Bazel, and writes blog posts about it.
He is also doing a Ph.D. in software engineering.