Move Fast and Build Things
Simon Stewart
simons@fb.com
github.com/shs96c
@shs96c
The Challenge

>150,000
files

>100,000
commits

>300
There is no Android team
How do we “move fast”?
Build fast
The working copy
▪ We

use git for source control

▪ Two

branches we care about day-to-day:

▪

master

▪

stable
How the code is organized

Text

http://www.flickr.com/photos/darwinbell/3030214710/
Code review
Image macros

QuickTime™ and a
GIF decompressor
are needed to see this picture.
Dependency injection

http://www.flickr.com/photos/31246066@N04/5253179784/
We needed a better tool
▪ Minimal
▪ Keep
▪ IDE

overhead in creating a module

boilerplate out of the codebase

friendly

...
Buck: an Android build system
▪ build

rule procedure for producing output files from input files

▪ build

file file (nam...
Build Target

//java/com/facebook/share:ui
Root of the repository
Directory where the build file can be found
Name of the ...
Build Rule
android_library( name = 'ui', srcs =
glob(['**/*.java']), deps =
[
'//android_res/com/facebook/share:res',
'//j...
Dependency Graph
AB
GR

AB
AL

AL

GR

AL

AL

AL

AL

AR

AR

AR
Dependency Graph
AB
GR

AB
AL

AL

GR

AL

AL

AL

AL

AR

AR

AR
Buck is Open Source!
▪ Available

on GitHub: https://github.com/facebook/buck/

▪ Documentation
▪ Apache
▪ Written
▪ Works...
Test fast
Developers write tests
Unit tests

http://www.flickr.com/photos/aracelota/4773084433/
Larger tests

http://www.flickr.com/photos/amphalon/6510474165/
Deploy fast
Dogfood, Alpha and Beta
Questions?
Upcoming SlideShare
Loading in …5
×

Simon Stewart, Facebook engineer - Building Facebook for Android

572 views

Published on

How does Facebook build its Android app? How are they working to improve the quality, speed and stability? In this talk, we'll cover everything Facebook's Android team does from source control, builds, testing and release, and show you how you can do the same.

More details on: http://2013.howtoweb.co/

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
572
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Simon Stewart, Facebook engineer - Building Facebook for Android

  1. 1. Move Fast and Build Things Simon Stewart simons@fb.com github.com/shs96c @shs96c
  2. 2. The Challenge >150,000 files >100,000 commits >300
  3. 3. There is no Android team
  4. 4. How do we “move fast”?
  5. 5. Build fast
  6. 6. The working copy ▪ We use git for source control ▪ Two branches we care about day-to-day: ▪ master ▪ stable
  7. 7. How the code is organized Text http://www.flickr.com/photos/darwinbell/3030214710/
  8. 8. Code review
  9. 9. Image macros QuickTime™ and a GIF decompressor are needed to see this picture.
  10. 10. Dependency injection http://www.flickr.com/photos/31246066@N04/5253179784/
  11. 11. We needed a better tool ▪ Minimal ▪ Keep ▪ IDE overhead in creating a module boilerplate out of the codebase friendly ▪ Faster clean builds ▪ Faster incremental builds ▪ Support ad-hoc build steps
  12. 12. Buck: an Android build system ▪ build rule procedure for producing output files from input files ▪ build file file (named BUCK) where build rules are declared ▪ build target string identifier for a build rule
  13. 13. Build Target //java/com/facebook/share:ui Root of the repository Directory where the build file can be found Name of the build rule
  14. 14. Build Rule android_library( name = 'ui', srcs = glob(['**/*.java']), deps = [ '//android_res/com/facebook/share:res', '//java/com/facebook/base:base', '//thirdparty/java/guava:guava', ], visibility = [ 'PUBLIC' ],) )
  15. 15. Dependency Graph AB GR AB AL AL GR AL AL AL AL AR AR AR
  16. 16. Dependency Graph AB GR AB AL AL GR AL AL AL AL AR AR AR
  17. 17. Buck is Open Source! ▪ Available on GitHub: https://github.com/facebook/buck/ ▪ Documentation ▪ Apache ▪ Written ▪ Works galore: http://facebook.github.com/buck/ 2.0 License in Java and a smattering of Python on OS X and Linux
  18. 18. Test fast
  19. 19. Developers write tests
  20. 20. Unit tests http://www.flickr.com/photos/aracelota/4773084433/
  21. 21. Larger tests http://www.flickr.com/photos/amphalon/6510474165/
  22. 22. Deploy fast
  23. 23. Dogfood, Alpha and Beta
  24. 24. Questions?

×