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
Tips for making build faster without Instant Run
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Tomoaki Imai
July 15, 2016
Programming
81
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Tips for making build faster without Instant Run
Tips for making build faster without Instant Run.
Tomoaki Imai
July 15, 2016
More Decks by Tomoaki Imai
See All by Tomoaki Imai
シリコンバレーでスタートアップを共同創業したファウンディングエンジニアとしての学び
tomoima525
1
1.9k
パッションの見つけ方,育て方
tomoima525
2
170
Decentralized ID とWebの未来
tomoima525
0
200
Web3/メタバースにおけるグローバルのトレンドと活用の最前線
tomoima525
2
3.9k
自分の道の歩み方~楽しくチャレンジするためのヒント~
tomoima525
2
630
Continuum: Background Checker with Zero-Knowledge Proof
tomoima525
0
2.8k
Catching up with TurboModule
tomoima525
1
4.6k
シリコンバレースタートアップのリモート開発
tomoima525
3
2k
A guide to writing specs toward engineers
tomoima525
0
350
Other Decks in Programming
See All in Programming
Laravelで学ぶ Webアプリケーションチューニング入門/web_application_tuning_101
hanhan1978
4
1.7k
Detecting Compromised CI with eBPF and Cilium Tetragon
lizrice
0
160
Built Our Own Background Agent at LayerX
layerx
PRO
9
5k
PHP Application における Kubernetes 内 gRPC 通信
ganchiku
0
580
霧の中の代数的エフェクト
funnyycat
1
480
メールのエイリアス機能を履き違えない
isshinfunada
0
220
torikago - Ruby::Boxで照らすモジュラモノリスの実行境界
se4weed
1
350
php-fpmのプロセスが枯渇した日-調査・対処・そして本当にやるべきだったこと-
shibuchaaaan
0
240
PHP初心者セッション2026 〜生成AIでは見えない裏側を知る:今だからLAMPを通して仕組みを学ぶ〜
kashioka
0
860
属人化した知識を、 AIが辿れる地図にする
pkshadeck
PRO
1
150
TSX の <Hoge<Fuga>> という構文に驚いた話 / tsx-type-argument-syntax
kanaru0928
0
210
2年かけて Deno に DOMMatrix を実装した話 / How I implemented DOMMatrix in Deno over two years
petamoriken
0
210
Featured
See All Featured
Rails Girls Zürich Keynote
gr2m
96
14k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
67k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.3k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
230
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.3k
Darren the Foodie - Storyboard
khoart
PRO
3
3.5k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
420
Code Reviewing Like a Champion
maltzj
528
40k
Technical Leadership for Architectural Decision Making
baasie
3
470
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
540
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
4.3k
Transcript
ਓྨ͕ Instant Run Λ͍͜ͳ ͦ͢ͷ·Ͱ Mercari, Inc. Tomoaki Imai
twitter: @tomoaki_imai github: tomoima525 ࠓҪ ஐষ Android Engineer 2016.1 transfered
to Mercari@US ඒຯ͍͠ΧϨʔͷΑ͏ʹ ਓΛͤʹग़དྷΔΑ͏ʹͳΓ͍ͨ
Recent https://speakerdeck.com/tomoima525/ab-testing-tips-for-mobile
Recent https://github.com/mercari/siberi-android Client library for AB Testing
Instant Run, ͬͯ·͔͢
Instant Runͷಛ • Ϗϧυ͕ര! • ݟ͍ͯΔActivityΛߋ৽ • Ξπ͍!!
Instant Runͷಛ • Ϗϧυ͕ര! • ݟ͍ͯΔActivityΛߋ৽ • Ξπ͍!! େ͖ͳϓϩδΣΫτͩͱ͍(1,2min) ߋ৽ͨ͠ϑϦͯ͠͠ͳ͍(ReRun͕ඞཁ)
ཧతʹΞπ͍(AS͕ϝϞϦര৯͍ɺCPUͿΜճ͢) ଞͷϓϩάϥϜ͕͘ͳΔ
None
Instant Run ਓྨʹૣ͗ͨ͢Μ…
ͱΓ͋͑ͣշదʹ։ൃ͢Δͨ ΊʹͬͯΔ͜ͱ
Tips 1. Self Instant Run
// Build with cached dependencies alias gud='./gradlew --offline assembleUsDev’ Build
// Notify after build is completed alias noti='terminal-notifier -message “done!!"'
alias gudn='./gradlew --offline assembleUsDev && noti’ Build & Notify https://github.com/julienXX/terminal-notifier
/** Build **/ alias gudd=‘gud Build & Install & Notify
/** Build **/ alias gudd=‘gud /** Show the latest ask
**/ && ls -lt ${AND_STD_DIR}/app/apk/ Build & Install & Notify
/** Build **/ alias gudd=‘gud /** Show the list of
apks **/ && ls -lt ${AND_STD_DIR}/app/apk/ /** The latest apk **/ | head -n 2 Build & Install & Notify
Build & Install & Notify /** Build **/ alias gudd=‘gud
/** Show the list of apks **/ && ls -lt ${AND_STD_DIR}/app/apk/ /** The latest apk **/ | head -n 2 /** Fetch the apk name **/ | awk '\''{print $9}'\''
Build & Install & Notify /** Build **/ alias gudd=‘gud
/** Show the list of apks **/ && ls -lt ${AND_STD_DIR}/app/apk/ /** The latest apk **/ | head -n 2 /** Fetch the apk name **/ | awk '\''{print $9}'\'' /** Install **/ | xargs -Immm adb install -r ${AND_STD_DIR}/app/apk/mmm
/** Build **/ alias gudd=‘gud /** Show the list of
apks **/ && ls -lt ${AND_STD_DIR}/app/apk/ /** The latest apk **/ | head -n 2 /** Fetch the apk name **/ | awk '\''{print $9}'\'' /** Install **/ | xargs -Immm adb install -r ${AND_STD_DIR}/app/apk/mmm /** Nofity when everything is done **/ && noti' Build & Install & Notify
/** Install **/ alias insl=‘gud && ls -lt ${AND_STD_DIR}/app/apk/ |
head -n 2 | awk '\''{print $9}'\''| xargs -Immm adb install -r $ {AND_STD_DIR}/app/apk/mmm’ Build & Install & Launch & Nofity = Self Instant Run
/** Install **/ alias insl=‘gud && ls -lt ${AND_STD_DIR}/app/apk/ |
head -n 2 | awk '\''{print $9}'\''| xargs -Immm adb install -r $ {AND_STD_DIR}/app/apk/mmm’ /** Launch **/ alias gudl=‘insl && adb shell am start com.mercariapp.mercari.dev/ com.kouzoh.mercari.activity.SplashActivity && noti' Build & Install & Launch & Nofity = Self Instant Run
• Good ! • ·͋·͍͋(--offlineޮՌ) • Ξπ͘ͳ͍(javaͷprocessͷΈ) • ଞͷ࡞ۀ͕ḿΔ(͘ͳΒͳ͍ɺ௨དྷΔ) •
Bad • ඞͣLaunchը໘ʹͬͯ͠·͏ Build & Install & Launch & Nofity = Self Instant Run
Tips 2. PlayGround
None
None
Android Playground • ࠷ݶͷϦιʔεϑΝΠϧ,UtilityΫϥε • ػೳ୯ҐͰߴʹ࣮͢Δ • ޙ΄ͲຊϓϩδΣΫτʹೖ͢Δ
Ingredients and Process • Ingredients ‣ build.gradle ( + proguard)
‣ Remove unused feature dependencies ‣ Application.java ‣ AndroidManifest.xml ‣ res/ ‣ utils/, lang/, Base Classes • Process ‣ Mix everything into new project(10min) ‣ Remove errors (50-60min)
͠Βͬͯ͘Έͨײ ˕͍ & Instant Runշద ˚ ෳͷػೳͷ։ൃΛ͍ͯ͠ΔͱMessyʹͳΔ ˚ ఆظతͳΩϟονΞοϓඞཁ →
ૉͷঢ়ଶΛmaster, Ճ͓͍ͯͨ͠ํ͕Α͍ػ ೳదٓmerge
Wrap up • ΦϨΦϨͳΜͪΌͬͯInstant Run͍͍Α • ػೳผ։ൃ༻ڥ(Playground)͍͍Α • ਓྨ͕Instant RunΛ͍͜ͳͤΔ·Ͱ࠲ͯͭ͠
(=AS2.2Ҏ߱ʹظ)