Posts

Showing posts with the label Kotlin

Why Memory Leak Detection Shouldn’t Run on Your Device: Building LeakLens for Android Studio

Image
Why Memory Leak Detection Shouldn’t Run on Your Device How LeakLens moves Android heap analysis out of the app process and into Android Studio with a dual-layer model of static analysis and runtime inspection. You are in the middle of a refactor, your test device lights up, and a familiar notification appears: 4 retained objects, dumping heap. The report is useful, but the interruption is not. You pick up the device, inspect the notification, try to remember the class names, then jump back into Android Studio to find the source. That debugging loop is exactly the problem this article addresses. The core question is simple: why is the tool that finds memory leaks running inside the same application process you are trying to debug? [page:1] That question became LeakLens , an Android Studio plugin that moves memory leak analysis into the IDE instead of embedding an SDK inside the application. [page:1] Table...

Fat AAR: Bundling Transitive Dependencies for Zero-Config Android SDK Consumers

Image
  Your SDK has 12 transitive dependencies. Your consumer’s build.gradle shouldn’t know about any of them. Why This Problem Is Uniquely Hard in KMP If you’re building a Kotlin Multiplatform SDK, you’re already dealing with complexity that traditional Android libraries never face. Your commonMain code compiles to both JVM bytecode (Android) and native binaries (iOS). On iOS, the XCFramework is self-contained - all Kotlin/Native dependencies compile into a single static binary. There's no "dependency resolution" on the Swift side. But on Android? You’re back in Gradle-land. Your KMP module produces a standard .aar , and every api() or implementation() dependency in your build.gradle.kts becomes a transitive edge in the consumer's dependency graph. The irony: the platform with the better tooling has the worse distribution story. This asymmetry is what makes Fat AAR essential for KMP SDK teams. iOS gets zero-config by default (static XCFramework). Android needs us to b...