Mobile Development 21 min read

Mobile Continuous Integration (MCI): Architecture and Best Practices at Meituan Dianping

Meituan Dianping’s Mobile Continuous Integration (MCI) architecture tackles tangled component dependencies, fragmented workflows, and long build times by combining GitLab‑based CI pipelines, dependency flattening, binary integration with multi‑threaded caching, a custom static‑analysis framework, comprehensive logging, monitoring, and a centralized configuration portal, achieving roughly 60 % faster iOS builds and 50 % faster Android builds.

Meituan Technology Team
Meituan Technology Team
Meituan Technology Team
Mobile Continuous Integration (MCI): Architecture and Best Practices at Meituan Dianping

Meituan Dianping, a leading Chinese lifestyle e‑commerce platform, operates thousands of mobile projects with a component library exceeding 600 items and millions of lines of code. Rapid business growth created challenges for mobile continuous integration, including complex project dependencies, cumbersome development workflows, long build times, and the need for high app quality.

Key challenges identified were:

Highly tangled component dependencies (average >70 per component, up to 270), making changes risky and manual dependency management impractical.

Fragmented development process requiring manual MR submission, component upgrade, packaging, and testing, which interrupts developers.

Build times increasing from 20 min to over 60 min for iOS and from 5 min to 11 min for Android.

App quality concerns such as crash rate and package size.

To address these issues, the team designed the MCI (Mobile Continuous Integration) architecture, a comprehensive CI ecosystem that includes a mobile CI platform, automated pipelines, static analysis, logging & monitoring, and configuration management.

Mobile CI Platform : Built primarily on GitLab CI (with auxiliary Jenkins jobs), the platform supports scalable CI servers, customizable pipelines, and concurrent task execution. Developers trigger CI via Merge Requests; the platform validates code, runs static checks, and publishes components to a shared component pool.

CI Pipeline Design : The pipeline consists of two stages – component release and integration into target apps. The release stage compiles the component library, runs static analysis, and publishes the component. The integration stage checks for dependency conflicts before merging into the app’s codebase, ensuring isolated and safe integration.

Automation : Workflow automation tools handle component release, integration, and app packaging, providing automatic status notifications, error alerts, and web‑hook‑driven monitoring. This frees developers to focus on coding and bug fixing.

Build Speed Optimizations :

Dependency flattening – pre‑specifying all dependency versions eliminates costly dependency resolution.

Binary integration – using pre‑compiled binary packages instead of source integration reduces compile time dramatically.

Multi‑threaded binary download and server‑side caching further cut down download latency.

These measures reduced iOS build time by ~60 % and Android build time by ~50 %.

Static Analysis Framework (Hades) : A custom static analysis platform built on AST (Abstract Syntax Tree) processing, offering full‑semantic code understanding, global analysis, incremental checks, and low integration cost. Hades powers over 20 static rules covering coding standards, null‑safety, threading best practices, resource usage, and more.

Logging & Monitoring : End‑to‑end logging captures each CI step, enabling time‑based performance analysis, failure detection, and package size monitoring. Alerts are sent for abnormal jobs, and success rates and binary coverage are tracked.

Information Management (Mocha) : A centralized configuration portal that registers project metadata, manages permissions, configures static checks, and provides component release history queries, simplifying project onboarding and governance.

In summary, the MCI system combines dependency flattening, binary integration, automated pipelines, and a robust static analysis suite to deliver a stable, high‑performance CI environment for large‑scale mobile development at Meituan Dianping.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Mobile DevelopmentAutomationBuild Optimizationcontinuous integrationCI platform
Meituan Technology Team
Written by

Meituan Technology Team

Over 10,000 engineers powering China’s leading lifestyle services e‑commerce platform. Supporting hundreds of millions of consumers, millions of merchants across 2,000+ industries. This is the public channel for the tech teams behind Meituan, Dianping, Meituan Waimai, Meituan Select, and related services.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.