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
94
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
100
Building Android Projects with kts
cdsap
2
250
The Build Shrugged
cdsap
1
64
State of Testing in Kotlin
cdsap
0
140
Dexs, R8 and 3.3
cdsap
0
270
Deep Dive Work Manager
cdsap
0
160
Kotlin: Server-Client
cdsap
0
73
Droidcon Dubai : Kotlin - Server - Client
cdsap
0
43
Kotlin: Server-Client
cdsap
3
490
Other Decks in Technology
See All in Technology
なぜ NOT A HOTEL が Web3 に取り組むのか - NOT A HOTEL TECH TALK
ynunokawa
0
160
社内勉強会運営のコツ
senoo
6
1.1k
AWS パートナー企業でテクニカルサポートに従事して2年経ったので思うところをまとめてみた
kazzpapa3
3
1.3k
[PlatformCon 24] Platform Orchestrators: The Missing Middle of Internal Developer Platforms?
danielbryantuk
0
170
Microsoft Cloudで開発ライフサイクルを保護する
kkamegawa
0
140
「ふりかえりのふりかえり」をふりかえり、実のあるふりかえりにする
naitosatoshi
0
210
SREとその組織類型
tatsuo48
8
1.5k
DevOpsDays History and my DevOps story
kawaguti
PRO
7
1.4k
アプリがつくるNOT A HOTELブランド
hokuts
0
450
SIEMを用いて、セキュリティログ分析の可視化と分析を実現し、PDCAサイクルを回してみた
coconala_engineer
0
190
AWS を使う上で知っておきたいオンプレミス知識/aws-on-premise-essentials
emiki
1
4.1k
NgRx Signal Store
rainerhahnekamp
0
100
Featured
See All Featured
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
226
16k
[RailsConf 2023] Rails as a piece of cake
palkan
22
3.9k
Web development in the modern age
philhawksworth
201
10k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
75
41k
Building Effective Engineering Teams - LeadDev
addyosmani
26
1.8k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
18
1.7k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
272
13k
The Brand Is Dead. Long Live the Brand.
mthomps
48
28k
Designing the Hi-DPI Web
ddemaree
276
33k
Automating Front-end Workflow
addyosmani
1354
200k
GraphQLとの向き合い方2022年版
quramy
30
12k
The Cult of Friendly URLs
andyhume
73
5.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