Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
buck, okbuck そして okbazel
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Ryosuke Horie
March 23, 2017
0
740
buck, okbuck そして okbazel
Ryosuke Horie
March 23, 2017
Tweet
Share
More Decks by Ryosuke Horie
See All by Ryosuke Horie
Androidifyから学ぶFirebase AI Logic SDKの使い方
horie1024
0
54
GitHub Copilot Use Cases at ZOZO
horie1024
1
2.5k
Miro × ZOZO ZOZOのMiro活用事例紹介
horie1024
0
2.7k
GitHub Copilotは開発者の生産性をどれだけ上げるのか?ZOZOでの全社導入とその効果 / How Much Does GitHub Copilot Improve Developer Productivity? The Company-wide Implementation and Its Effects at ZOZO
horie1024
36
29k
ZOZOTOWNにおける開発生産性向上に関する取り組み / Initiatives to Improve Development Productivity at ZOZOTOWN
horie1024
8
6.6k
How does the Relay connect Android app development and Design?
horie1024
2
2.2k
既存画面の Jetpack Composeでの書き換え: FAANSでの事例紹介 / Case study of rewriting existing screens with Jetpack Compose
horie1024
0
2k
スキルマップを作った話 / Create a skills map
horie1024
3
4.7k
Miroを使った開発効率向上のための取り組み / Using Miro Efforts to Improve Development Efficiency
horie1024
0
2.6k
Featured
See All Featured
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
79
Code Review Best Practice
trishagee
74
20k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
110
Evolving SEO for Evolving Search Engines
ryanjones
0
130
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
160
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
170
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
920
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
From π to Pie charts
rasagy
0
130
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
420
Test your architecture with Archunit
thirion
1
2.2k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.1k
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