Skip to main content

Facebook publicly launches Buck, a new Android build system

[protected-iframe id=”21771d77d6434337b7598abb88e78e36-22427743-13611283″ info=”http://new.livestream.com/accounts/2099733/events/2089675/videos/18329840/player?autoPlay=false&height=396&mute=false&width=704″ width=”704″ height=”396″ frameborder=”0″ scrolling=”no”]

Just in time for Google I/O, Facebook just posted some big news for Android developers:

At the end of Camp Hack-a-Thona (the name of our annual three day hackathon in the summer), I had a working prototype for Buck, a new Android build system. By the end of August, I introduced Buck as the build tool for our Android apps, and we deleted all of the build.xml files in our repository a couple of weeks later. It took less time to download Buck’s source code, build it from scratch, and then build the Android app with Buck than it took to build the Android app with Ant. From Day 1, Buck was twice as fast as Ant, cutting Facebook for Android app build times down from 3:40 to 1:30.

Buck has enabled us to scale our repository, as modules are defined by simple, declarative build rules, so the overhead in creating one is negligible. Today we have the equivalent of over 400 Android library projects in our repository (but only 51 AndroidManifest.xml files and 141 res/ directories), which would be unthinkable using Ant. Because all four of our Android apps (Facebook for Android, Messenger, and  Pages Manager) are built from one codebase with a single, unified directory of Java source code, code reuse is straightforward. This fine-grained design also makes it easier to create small, sample applications for testing individual features of an app. These sample apps can be built much more quickly than the full-blown Facebook for Android app, which helps our developers iterate faster.

The crowd at Mobile DevCon NYC convinced me that we should not keep this tool to ourselves and that it was time to open-source Buck. Watch the video here.

We are extremely excited to share Buck with the Android development community. You can check out the code from GitHub as well as explore the documentation. We hope that you find Buck as helpful in scaling and speeding up your Android development as we have.

FTC: We use income earning auto affiliate links. More.

You’re reading 9to5Google — experts who break news about Google and its surrounding ecosystem, day after day. Be sure to check out our homepage for all the latest news, and follow 9to5Google on Twitter, Facebook, and LinkedIn to stay in the loop. Don’t know where to start? Check out our exclusive stories, reviews, how-tos, and subscribe to our YouTube channel

Manage push notifications

notification icon
We would like to show you notifications for the latest news and updates.
notification icon
You are subscribed to notifications
notification icon
We would like to show you notifications for the latest news and updates.
notification icon
You are subscribed to notifications