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
Tomoaki Imai
July 15, 2016
Programming
0
64
Tips for making build faster without Instant Run
Tips for making build faster without Instant Run.
Tomoaki Imai
July 15, 2016
Tweet
Share
More Decks by Tomoaki Imai
See All by Tomoaki Imai
パッションの見つけ方,育て方
tomoima525
1
73
Decentralized ID とWebの未来
tomoima525
0
150
Web3/メタバースにおけるグローバルのトレンドと活用の最前線
tomoima525
2
3.1k
自分の道の歩み方~楽しくチャレンジするためのヒント~
tomoima525
2
490
Continuum: Background Checker with Zero-Knowledge Proof
tomoima525
0
2.5k
Catching up with TurboModule
tomoima525
1
3.8k
シリコンバレースタートアップのリモート開発
tomoima525
3
1.9k
A guide to writing specs toward engineers
tomoima525
0
290
A guide to writing specs toward engineers(Japanese)
tomoima525
9
2.5k
Other Decks in Programming
See All in Programming
ナレッジイネイブリングにAIを活用してみる ゆるSRE勉強会 #9
nealle
0
160
PRレビューのお供にDanger
stoticdev
1
240
Serverless Rust: Your Low-Risk Entry Point to Rust in Production (and the benefits are huge)
lmammino
1
160
技術を改善し続ける
gumioji
0
140
第3回関東Kaggler会_AtCoderはKaggleの役に立つ
chettub
3
1.2k
1年目の私に伝えたい!テストコードを怖がらなくなるためのヒント/Tips for not being afraid of test code
push_gawa
1
630
Learning Kotlin with detekt
inouehi
1
150
Boos Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
440
苦しいTiDBへの移行を乗り越えて快適な運用を目指す
leveragestech
0
1.1k
Domain-Driven Design (Tutorial)
hschwentner
13
22k
5分で理解する SOLID 原則 #phpcon_nagoya
shogogg
1
370
SwiftUI移行のためのインプレッショントラッキング基盤の構築
kokihirokawa
0
160
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.7k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
129
19k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
30
4.6k
Why Our Code Smells
bkeepers
PRO
336
57k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
570
Practical Orchestrator
shlominoach
186
10k
Building an army of robots
kneath
303
45k
Bootstrapping a Software Product
garrettdimon
PRO
306
110k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Become a Pro
speakerdeck
PRO
26
5.2k
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Ҏ߱ʹظ)