From Idea to IDE: Developing Plugins for Android Studio
summary
A working Android Studio plugin is built that adds a context menu item Document this code, sends the selected Kotlin element to Gemini AI via a Ktor client, and writes back generated documentation and refactored names using the IDE refactoring APIs, proving the approach works in a live demo. It uses the new Plugin SDK 2.0, Project Structure Interface (PSI) to read elements, actions to register the UI, services with a service scope and coroutines to switch between background work and EDT while respecting read/write locks.
AI-written summary · about
chapters (21)
- 0:00Android Studio plugin intro
- 1:03What to build a plugin
- 2:27Plugin types
- 3:54Plugin project setup
- 5:18Understanding plugin.xml and configuration
- 7:03Add interactive actions
- 8:30Action update logic
- 10:14Code analysis with PSI
- 11:45BSI files explained
- 13:32Add language support
- 13:53Services and dependency injection in plugins
- 15:37App and project services
- 16:41Threading in IDEs
- 18:09Coroutines dispatchers
- 20:20Background tasks with coroutines
- 21:01Plugin development recap
- 21:22Live plugin demo
- 23:30Plugin UI options
- 26:18Compose UI considerations
- 27:01Learning resources
- 28:07Q&A
related talks
21mSupercharge Android Studio: Developing Your First Plugin
33mMake your Android Studio Plugin
42mWrite your own Android Studio Plugin and automate everything
26mEnough with scripts, let's create an Android Studio plugin?
31mBuilding an IDE plugin for clean code generation
20mUpgrade Android Studio experience by building your own plugins
39mFantastic Plugins and Where They Live
01h 09mWorkshop (part 2): Let's plugin some more
