Urgent.News

What's breaking now, across thousands of outlets.

Tech

SSKCore: Turning Production Pain Into an Android Platform [PART-2]

๐Ÿ“š This is part 2 of a series. Part 1: The Origin Story Part 2: [Current Article] Part 3: Coming soon... Let me tell you about the day my crash reporting UI crashed. The Grey Screen One afternoon, my Android app's crash screen rendered all-grey. No content. No report button. Just a blank slate where the app's last line of defense should have been. The root cause? A stale file from Gradle's buildโ€ฆ

Part 2: SskCore - Turning Production Pain Into an Android Platform

In this part, the author recounts several incidents that led to the creation of SskCore, a set of tools designed to address the challenges of building multiple Android apps that share code.

The author describes a crash in their Android app with a grey screen, caused by a stale Gradle build cache file after a major refactor. The root cause was mismatched compiled resource IDs and inflated ViewBinding layouts, leading to a silent NullPointerException that went undetected in CI and only appeared in specific rebuild scenarios. This incident taught the author that the fix is not complete until the lesson is automated.

Another incident involved a Floating Action Button disappearing from consumer apps, with debug menus being inaccessible and secure screens incorrectly enabled. The author discovered that the shared library's BuildConfigUtils was reading its own BuildConfig, which is baked as "release" at publish time. An AAR cannot know the consumer's build type, resulting in 25 files across 34 call sites being silently broken.

In a third incident, an app depending on core-base suddenly gained the AD_ID permission, initializing Google Mobile Ads unconditionally, even for users who wouldn't see an ad. This happened because core-base hard-depended on play-services-ads, causing every consumer to inherit the permission. The fix was to extract the ad code into an opt-in module, with apps requiring ads explicitly adding the dependency.

These incidents led the author to recognize the larger problem: building multiple Android apps that share code is genuinely hard. The author then explains SskCore, which consists of 18 published library modules and over 60 custom Gradle tasks, all built by one developer from real production pain points. SskCore's key features include automatic source/binary switching, 60+ custom Gradle tasks, catalog-driven module discovery, and documentation with incident context.

The author emphasizes that SskCore was built by a solo developer, highlighting the challenges and benefits of this approach. They argue that simplicity is often overrated and that complexity exists because simpler approaches fail in production. The author concludes by considering open-sourcing the build-logic separately, as the 60+ tasks and composite-build infrastructure are genuinely useful for any multi-module Android project.

Written by urgent.news from Dev.to's reporting โ€” not their text. Machine-written โ€” may contain errors; check the original before relying on it.

Read the original at dev.to โ†’

More in Tech

More from Monday 24 August โ†’