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
Advanced Topics Android
Search
Iñaki Villar
July 01, 2018
Technology
0
95
Advanced Topics Android
Google IO Extended 2018 Bangkok
Iñaki Villar
July 01, 2018
Tweet
Share
More Decks by Iñaki Villar
See All by Iñaki Villar
Scaling Android Builds in Pandemic Times
cdsap
1
120
Building Android Projects with kts
cdsap
2
270
The Build Shrugged
cdsap
1
68
State of Testing in Kotlin
cdsap
0
180
Dexs, R8 and 3.3
cdsap
0
300
Deep Dive Work Manager
cdsap
0
230
Kotlin: Server-Client
cdsap
0
79
Droidcon Dubai : Kotlin - Server - Client
cdsap
0
46
Kotlin: Server-Client
cdsap
3
500
Other Decks in Technology
See All in Technology
Mocking in Rust Applications
taiki45
2
410
プログラム検証入門
riru
6
880
言葉は感情の近似値である。その感情と言葉の誤差を最小化しよう ~コミュニケーションにおけるアナログ/デジタル変換の課題に立ち向かう~
nktamago
0
240
やってやろうじゃないかメカアジャイル! / Let's do it, mechanical agile!
psj59129
1
690
LINEヤフーのフロントエンド組織・体制の紹介
lycorp_recruit_jp
1
1.2k
PDF Viewer作成の今までとこれから
hunachi
0
480
チームビルディングは"感性"で向き合おう / Team Building with Awareness
kohzas
0
270
「自動テストのプラクティスを効果的に学ぶためのカードゲーム」 ( #sqip2024 )
teyamagu
PRO
2
180
Developer Experienceを向上させる基盤づくりの取り組み事例集
coconala_engineer
0
160
GC24 Recap: Interface Internals
task4233
0
220
AI前提のサービス運用ってなんだろう?
ryuichi1208
2
750
「家族アルバム みてね」における運用管理・ オブザーバビリティの全貌 / Overview of Operation Management and Observability in FamilyAlbum
isaoshimizu
4
160
Featured
See All Featured
Done Done
chrislema
180
16k
Building Flexible Design Systems
yeseniaperezcruz
325
38k
4 Signs Your Business is Dying
shpigford
179
21k
Become a Pro
speakerdeck
PRO
22
4.9k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
123
18k
The Power of CSS Pseudo Elements
geoffreycrofte
71
5.3k
Designing for humans not robots
tammielis
248
25k
How To Stay Up To Date on Web Technology
chriscoyier
786
250k
Raft: Consensus for Rubyists
vanstee
136
6.5k
Web development in the modern age
philhawksworth
205
10k
Into the Great Unknown - MozCon
thekraken
29
1.4k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
23
1.7k
Transcript
None
Inaki Villar @inyaki_mwc Advanced Android Topics
None
Testing D8/R8 ART
Testing
Android Test • Includes existing libraries • APIs and Kotlin
• Open Source
• Robolectric 4.0 (alpha) • androidx.test support • Support Espresso
None
None
gradlew clean connectedAndroidTest
gradlew clean connectedAndroidTest gradlew clean test
gradlew clean connectedAndroidTest gradlew clean test
https://proandroiddev.com/robolectric-testing-with-androidjunitrunner-86292bceef25
None
None
None
None
None
None
D8/R8
D8/R8 Kotlin File Java File kotlinc javac class dex apk
D8/R8 Kotlin File Java File kotlinc javac class dex apk
class dex apk
class dex apk
class dex apk
dex
dex
D8/R8 kotlinc javac DX APK < 3.0
D8/R8 kotlinc javac DX APK kotlinc javac DX DX Merging
APK < 3.0 > 3.0
D8/R8 kotlinc javac Desugar DX 3.0/3.1 APK
D8/R8 kotlinc javac Desugar DX kotlinc javac D8 APK 3.0/3.1
3.1+ APK
D8/R8 kotlinc javac Desugar DX kotlinc javac D8 APK 3.0/3.1
3.1+ APK
None
75% reduced size of MainDexFile Release 56% reduced size of
MainDexFile Debug 10% reduced time for Debug builds
D8/R8 2nd phase : D8/DX(fully deprecated) - 1 year approx.
1st phase : D8/DX - 6 months approx. 3rd phase: DX removed from AS
D8/R8
D8/R8 kotlinc javac Proguard D8/DX No R8 APK
D8/R8 kotlinc javac Proguard D8/DX kotlinc javac R8 APK No
R8 APK
D8/R8 Russia 0 - Spain 3
D8/R8
ART
ART Applications Android Framework ART Native Libraries HAL Kernel
ART Applications Android Framework ART Native Libraries HAL Kernel Dalvik
Pre Lollipop
ART Dalvik JIT Just In Time AOT Ahead Of Time
ART Dalvik JIT Just In Time AOT Ahead Of Time
App Run Translate ByteCode to Machine code Less Space Less Memory
ART Dalvik JIT Just In Time AOT Ahead Of Time
App Install Translate ByteCode to Machine code App Run Faster Better Startup Battery Performance
None
JIT Returns
JIT Returns
None
Memory and Storage Kotlin Cloud Profiles ART
ART
ART
ART
ART Inlining - CheckParameterIsNotNull
ART Inlining - CheckParameterIsNotNull https://blacklenspub.com/inline-function-in-kotlin-adb51b0eab76
Cloud Profiles
Cloud Profiles
None
Testing D8/R8 ART Summary
None
Kotlin for Android Developers https://goo.gl/forms/cJO6To3bgYGOMhMJ2
Inaki Villar ขอขอบคุณ /Thank you @inyaki_mwc