Shrinking in the Age of Kotlin
summary
Shrinking Java bytecode compiled from Kotlin requires updating the embedded kotlin metadata annotation rather than treating classfiles as plain Java; otherwise reflection, compilation and IDE inspections break. A concrete solution links Java class/method entries to metadata, renames or removes corresponding metadata entries, and re-writes the annotation. Implementation uses proguard-core plus kotlinx-metadata-jvm, and an open-source metadata printer plus a Program-based writer that successfully syncs and preserves Kotlin-specific info.
AI-written summary · about
chapters (10)
- 0:00Shrinking in Kotlin intro
- 2:52How shrinkers process Kotlin
- 6:07Why Kotlin needs special shrinkers
- 10:25Kotlin metadata structure
- 11:48Why Kotlin metadata matters
- 13:34ProGuard and Kotlin metadata
- 14:16Reading/modifying Kotlin metadata
- 19:42Metadata modification example
- 20:25Tools for Kotlin metadata
- 21:36Q&A








