Sam Edwards | KotlinConf 2024, May 22–24, Copenhagen
all speakers

Sam Edwards

Sam Edwards

Android Foundation @ Square

Sam has been sharing his knowledge on software development through talks, post, open source and screencasts and is recognized as a Google Developer Expert (GDE) for Android and Kotlin. He has a passion for creating high quality software, learning from the community and sharing back his experiences. He's been working with Android for 13 years and and has 19 years of professional experience with software development. Check out where he shares tips and tricks about Android and Kotlin development.

Dynamic Exploration of Static Analysis with Compose

Static analysis is so much more than just finding lint errors. With custom static analyzers, you can collect data you are interested in to better understand your codebase at scale.

I personally found the idea of collecting custom analysis to be unapproachable and I didn’t know where to start. After making it through, and finding so much value, I want to break down that barrier for you through a series of examples. These examples are based on real use cases where you will learn how to write your own static analysis collectors for Kotlin, how to visualize the analysis results with Compose, and find hidden insights into your team’s project.

We’ll start by learning how to create a custom static analyzer of your project via Kotlin's Program Structure Interface (PSI) to collect the data. In this case we’ll collect Anvil and Dagger Dependency Injection contributions and usage.

We’ll then continue on to use the collected analysis data to render a Compose report allowing us to see these dependency relationships that are unavailable to the IDE (because it is unaware of our dependency injection frameworks).

This talk gives you the foundation you need to write custom static analysis collectors, how you can explore that data, and solve problems for your team at scale.