Automated migration of Android apps to Bazel build system
summary
A Gradle plugin lives in buildSrc and exposes a migrateToBazel task that scans every module’s configurations, extracts implementation/API dependencies, maps internal modules to Bazel labels, and emits per-module build.bazel generation files plus a workspace. A two-module demo (app + images) writes BUILD.bazel files and Bazelisk runs bazel build successfully. The migration uses a Kotlin codegen DSL (Airin) to produce Starlark, preserves dependency graphs, and surfaces real issues: Bazel rejects single-token package names and data binding needs custom rules.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 1:10What is Bazel
- 7:56Migration goals
- 9:21Gradle plugin approach
- 12:49Demo: Simple project
- 23:41Running migration
- 26:27Real-world challenges
- 28:55Code generation with DSL
- 37:39Conclusion and resources
related talks
17mGrazel - A Gradle plugin to automate Bazel migration for Android projects
43mBoosting Bazel adoption on Android with automation
48mBazel for Android Development
41mBazel on Android: The Good, The Bad and The Ugly
01h 12mBazel for Android Developers
42mBazel
26mSpotify's Journey to Releasing One of the World's Largest Apps wit...
41mDo You Need Bazel in Android Development?
