Deezer Mar 4, 2021

Private libraries in Android — how to manage them.

Article Summary

Jean-Baptiste Vincey from Deezer reveals how their team manages private Android libraries across multiple apps—without the chaos. Their approach handles 3 major libraries with bi-weekly releases and keeps dependencies aligned.

This is part 2 of Deezer's series on private libraries, focusing on the practical implementation details. The team manages Core, Design, and Server-driven UI libraries used across their Android applications, with each library maintained as an independent Gradle project with its own Git repository.

Key Takeaways

Critical Insight

Deezer's structured approach to private library management enables fast-paced multi-app development with consistent components, though managing dependencies across multiple libraries remains challenging.

The article reveals a clever branching strategy that solves the tricky problem of developing features that depend on unreleased library code.

About This Article

Problem

Deezer's private libraries are scattered across different applications, which creates dependency misalignment issues. When libraries depend on each other but apps use different versions of shared dependencies like Kotlin and AndroidX, conflicts happen.

Solution

Jean-Baptiste Vincey's team looked into moving all libraries into a single Git repository. This would make it easier to manage how the libraries depend on each other while keeping each module independent and maintaining separate release cycles.

Impact

A monorepo setup would stop version conflicts between the Core, Design, and Server-driven UI libraries. The bi-weekly release train and snapshot branch workflows that each library currently uses would stay in place.