Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
buck, okbuck そして okbazel
Search
Ryosuke Horie
March 23, 2017
770
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
buck, okbuck そして okbazel
Ryosuke Horie
March 23, 2017
More Decks by Ryosuke Horie
See All by Ryosuke Horie
Androidifyから学ぶFirebase AI Logic SDKの使い方
horie1024
0
98
GitHub Copilot Use Cases at ZOZO
horie1024
1
3.6k
Miro × ZOZO ZOZOのMiro活用事例紹介
horie1024
0
3.2k
GitHub Copilotは開発者の生産性をどれだけ上げるのか?ZOZOでの全社導入とその効果 / How Much Does GitHub Copilot Improve Developer Productivity? The Company-wide Implementation and Its Effects at ZOZO
horie1024
36
31k
ZOZOTOWNにおける開発生産性向上に関する取り組み / Initiatives to Improve Development Productivity at ZOZOTOWN
horie1024
8
6.8k
How does the Relay connect Android app development and Design?
horie1024
2
2.3k
既存画面の Jetpack Composeでの書き換え: FAANSでの事例紹介 / Case study of rewriting existing screens with Jetpack Compose
horie1024
0
2.1k
スキルマップを作った話 / Create a skills map
horie1024
3
4.9k
Miroを使った開発効率向上のための取り組み / Using Miro Efforts to Improve Development Efficiency
horie1024
0
2.8k
Featured
See All Featured
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
470
Everyday Curiosity
cassininazir
0
340
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
850
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
Side Projects
sachag
456
43k
Are puppies a ranking factor?
jonoalderson
2
4k
GitHub's CSS Performance
jonrohan
1033
470k
Test your architecture with Archunit
thirion
2
2.4k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5.1k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
530
Transcript
buck, okbuck ͦͯ͠ okbazel @Horie1024 2017/3/23 Gotanda.mobile #2 1
About Me • Ryosuke Horie @Horie1024 • VASILY,Inc. AndroidΤϯδχΞ •
ࡢ11݄ʹޒా • !ͱࣗಈԽ͕͖ • ࠷ۙࢠڙ͕ੜ·Ε·ͨ͠" 2
ࠓ͢༰ • AndroidͷϏϧυπʔϧʹ͍ͭͯͷ 3
AndroidͷϏϧυπʔϧ • 2017/3/23ݱࡏ Android StudioͰͷ։ൃ͕Ұൠత • Android Gradle Plugin •
Android StudioͷϏϧυγεςϜGradleϕʔε • Ϗϧυπʔϧͱͯ͠Gradle͕ඪ४ 4
GradleͰͷϏϧυ • Gradleڧྗ! • DSLͰͷϏϧυεΫϦϓτͷهड़ • ϚϧνϓϩδΣΫτͷϏϧυ • ॊೈͳґଘؔͷཧͳͲ •
͔͠͠Ϗϧυ͕͘ͳ͍" 5
ϏϧυΛߴԽ͢Δʹʁ! • Ξϓϩʔν2ͭ • ઃఆͷௐ • GradleҎ֎ͷϏϧυπʔϧͷར༻ 6
ઃఆͷௐ • ϓϩδΣΫτʹ߹Θͤͯνϡʔχϯά • How to decrease your Gradle build
time by 65%? • 10 Tips to Improve Your Gradle Build Time 7
GradleҎ֎ͷϏϧυπʔϧͷར༻ • Bazel • Buck 8
Bazel • Google͕։ൃ͍ͯ͠ΔϏϧυπʔϧ • Cookpad͞Μͷهࣄ͕Θ͔Γ͍͢ • http://techlife.cookpad.com/entry/introduce- bazel-build 9
Buck • Facebook͕։ൃɾ༻͍ͯ͠ΔϏϧυπʔϧ • ex-Googlers͕FacebookͰ࡞ͬͨΒ͍͠(Bazel Q&AΑΓ) • BuckBazelΑΓޙʹઃܭ • ಛ͕ҟͳΔͷͰGoogleBuckΛΘͳ͍(Bazel
Q&AΑΓ) 10
BazelͱBuckͷҧ͍ʁ! 11
Bazel features • Speed • Scalability • Flexibility • Correctness
• Reliability • Repeatability 12
Buck features • Speed up your builds • Add reproducibility
to your builds • Get correct incremental builds • Understand your dependencies • Integrate with your IDE 13
BazelͱBuckͷҧ͍ʁ! • ͲͪΒϏϧυ͕͍ͷ͕ചΓ • ϏϧυΛߴԽ͍ͨ͠ͷͰخ͍͠ • ಛ͕શମతʹࣅ͍ͯΔΑ͏ͳؾɾɾ • ϏϧυεΫϦϓτͷॻ͖ํࣅ͍ͯΔ 14
Bazel android_library rule sample android_library( name = "activities", srcs =
glob(["src/activities/*.java"]), custom_package = "com.google.bazel.example", manifest = "src/example/AndroidManifest.xml", resource_files = glob(["src/example/res/**"]), ) 15
Buck android_library rule sample android_library( name = 'lib', srcs =
glob(['*.java']), deps = [ '//android/resources:res', '//android/cxx:jni', ], visibility = [ '//android:demo-app', ], ) 16
BazelͱBuckͷҧ͍ʁ! • ͲͪΒϏϧυ͕͍ͷ͕ചΓ • શମతʹࣅ͍ͯΔ • ϏϧυεΫϦϓτͷॻ͖ํࣅ͍ͯΔ 17
BazelͱBuckͷҧ͍ʁ! • ͲͪΒϏϧυ͕͍ͷ͕ചΓ • શମతʹࣅ͍ͯΔ • ϏϧυεΫϦϓτͷॻ͖ํࣅ͍ͯΔ • ͲͪΒϏϧυͷઃఆ͕͍͠ 18
Ϗϧυͷઃఆਏ͍ • BazelɺBuckͷͲͪΒGradleͱൺֱͯ͠ཧղ͠ਏ͍ • Gradle͔ΒͷҠߦίετ⬆ • ϝϯς͢Δͷਏͦ͏ • ͦ͜Ͱొ͢Δͷ͕okbuck 19
okbuck • Uber͕։ൃ͍ͯ͠ΔGradle plugin • https://github.com/uber/okbuck • GradleϓϩδΣΫτͰBuckΛ׆༻͢Δͷ͕త • Gradle
wrapperϥΠΫͳBuck wrapperΛఏڙ • ./buckw build target 20
okbuck tasks • buckWrapper - Create buck wrapper • okbuck
- Generate BUCK files • okbuckClean - Delete configuration files generated by OkBuck • setupOkbuck - Setup okbuck cache and dependencies 21
Generate BUCK files • ./gradlew okbuckͰBUCKϑΝΠϧΛੜ • build.gradle͔ΒઃఆΛಡΈࠐΈࣗಈੜ 22
GradleͱBuckͷڞଘ • GradleϓϩδΣΫτͷߏΛม͑ͣʹBuckͱڞଘ • طଘͷϓϩδΣΫτͷಋೖ͕༰қ • ։ൃBuckɺϦϦʔεAPKGradleͰϏϧυͷΑ͏ͳ͍ํ 23
Ϗϧυൺֱ • okbuckαϯϓϧϓϩδΣΫτݕূ • 5ճΫϦʔϯϏϧυΛ࣮ߦͨ͠ฏۉ • Buck: ฏۉ 19.6s •
Gradle: ฏۉ 79.2s 24
okbuckͷ੍ • Buckͷ੍Λͦͷ··ड͚Δ • DataBindingඇαϙʔτ! • Kotlinඇαϙʔτ! • Facebookͷํʹࠨӈ͞ΕΔ 25
okbazelʁ 26
okbazel • okbuckͷrepositoryʹPull Request͕ग़͍ͯΔ • Experimental okbazel support #251 •
PRग़ͯ͠ΔͷBazelͷதͷਓΒ͍͠ • Ϛʔδ͞Ε͍ͯͳ͍ 27
okbazelͷ੍ • Bazelͷ੍Λͦͷ··ड͚Δ • DataBindingαϙʔτPR͕ग़͍ͯΔ • Add Android data binding
support • Kotlinαϙʔτݱঢ়Ͳ͏ͳΔ͔Θ͔Βͳ͍ • Google͕։ൃ͍ͯ͠Δͷେ͖͍ 28
·ͱΊ • okbuckΛར༻͢ΔͱGradleϓϩδΣΫτͰBuckΛར༻Մೳ • buckͰϏϧυ͘ͳΓͦ͏੍͕ͩ͋Δ • okbazel͕։ൃதͳͷͰظ! 29
͋Γ͕ͱ͏͍͟͝·ͨ͠ 30