Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
札束でGradleのケツを叩く
Search
Ryo Sakaguchi
November 09, 2016
Programming
1.4k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
札束でGradleのケツを叩く
Android app build speed can be made faster with $$$.
Ryo Sakaguchi
November 09, 2016
More Decks by Ryo Sakaguchi
See All by Ryo Sakaguchi
なんとなくgRPC-Java を使ってるそこの俺、gRPC-Kotlin に移行したらどうだ?
wakwak3125
0
25
Android Architecture Componentsを使って、改善・効率化するAndroidアプリ開発
wakwak3125
0
1.4k
Test multiple APKs with Robolectric
wakwak3125
0
840
Clip, Elevation and ViewOutlineProvider
wakwak3125
1
1.4k
WebView as Fancy and effective View
wakwak3125
1
1.7k
ViewPager2をちょっとさわってみよう
wakwak3125
0
1.7k
年末だし、振り返るKotlin
wakwak3125
1
1.2k
社内ライブラリのアップデートフロー
wakwak3125
4
3.9k
Wantedly Peopleのリリースフロー
wakwak3125
1
4.9k
Other Decks in Programming
See All in Programming
20260914 AIエージェント時代のPlatform Engineering LLM基盤とプロダクトの責務境界線
kanfab1
7
2.3k
モバイル交通系ICへのチャージ実例から考える、クロスプラットフォーム開発におけるiOS実機テスト設計とCI運用
yusuga
1
570
Simple Storage Service(S3) is not simple
iwatsukayura
0
120
モジュールの視点からSwiftを読み解く #iosdc
s_shimotori
0
300
App Intentsのビルドプロセスを支える技術
kntkymt
0
490
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.4k
更なる可用性を求めて、5年間運用したKotlinのアプリケーションをGoでリプレイスする話
ken_tunc
0
430
Security issues being discussed on Web Platforms
petamoriken
0
1.4k
Vue Fes Japan 2026 タイムテーブル徹底解説
448jp
1
590
マイコン向けの軽量Ruby「PicoRuby」で各種デバイスを制御するネイティブアプリの実現手法
bash0c7
0
470
Turning Architecture into Unit Tests in the AI Era (NSSpain XIV)
steliosf
PRO
1
120
JAWS-UG 東京支部が始める、JAWS-UG支部コラボ / JAWS-UG lunchtime LT Collaboration
y0hgi
0
170
Featured
See All Featured
For a Future-Friendly Web
brad_frost
183
10k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
2.9k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
260
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
730
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
290
SEO for Brand Visibility & Recognition
aleyda
0
4.8k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
270
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
690
Thoughts on Productivity
jonyablonski
76
5.4k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
380
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
420
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.3k
Transcript
ࡳଋͰGradleͷ έπΛୟ͍ͯΈͨ 2016/11/09 ୈ1ճελʔτΞοϓAndroidษڧձ @wakwak3125 from Lang-8, Inc
Ԛ͍λΠτϧͰ͢Έ·ͤΜ
About me. • ࡔޱ ྒ(͔͙ͪ͞Γΐ͏) • Ո۩ -> SIer ->
AndroidΞϓϦΤϯδχΞ • Θ͘Θ͘͞ΜͬͯݺΕͯ·͢ • ܲͱϏʔϧ͕͖Ͱ͢ • ࠓͷओ࠵ऀΛ͍͍͓ͤͯͨͩͯ͞Γ·͢
HiNative? • ޠֶ/จԽͷQ&AαʔϏε • ࣭͢ΔͱͦͷݴޠͷωΠςΟϰε ϐʔΧʔ͕͑ͯ͘Ε·͢ɻ • ͪΖΜແྉͰ͢
Example • ޠ͕ӳޠͰຊޠΛษڧ͍ͯ͠Δ Ϣʔβʔͷํ͕ɺʮ͜ͷຊޠͰࣗ વ͔ͳʁʯͱ͍͏༷ͳײ͡Ͱ࣭͠ ͍ͯ·͢ɻ • ͜ΕථܗࣜͰճ͕Ͱ͖ΔͷͰ ൃԻνΣοΫͳͲʹศརͰ͢ɻ
Ͱຊ…
AndroidϏϧυ͕͍ͱݴΘΕ·͢ΑͶ
࠷ۙiOS͔ΒAndroidʹҠͬͨ ࢲͷ༑ਓࣄ͋Δ͝ͱʹ
ʮͬͱૣ͘Ͱ͖Μͷʁʯ
ͱɺฉ͍ͯ͘Δ࢝Ͱ͢ɻ
ͱ͍͏ࣄͰɺϏϧυ࣌ؒΛߴԽ͢Δ Α͋͘ΔྫΛ·ͱΊͯΈ·ͨ͠ɻ
͔͜͜Βࢲͷݸਓͷڥͷ͓Ͱ͢ ྃ͝ঝ͍ͩ͘͞
Offline workʹ͢Δ
gradle.propertiesΛฤू͢Δ • org.gradle.daemon=true • σʔϞϯϓϩηεΛ͍·͢ • org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
• JVMͷҾʹϝϞϦΛͲΕ͘Β͍·ͰׂΓͯΔ͔Λ͜͜Ͱࢦఆ͢Δ • org.gradle.parallell=true • ฒྻϞʔυΛ༗ޮԽ • org.gradle.configureondemand=true • େ͖ͳϓϩδΣΫτͳͲͰ༗ޮͳ༷Ͱ͢ɻ gradle.properties 1/3
KotlinͷํՃͰ… • kotlin.incremantal=true • KotlinͰIncrementalϏϧυ͕༗ޮʹͳΓ·͢ɻ gradle.properties 2/3
AndroidStudio2.2Ͱ • android.enableBuildCache=true • ϏϧυΩϟογϡ͕༗ޮԽ͞ΕΔ༷Ͱ͢ɻ • ͦ͜·ͰͷޮՌͳ͍༷Ͱ͕͢ɺΕΔ͜ͱ͍ͬͯ ͖·͠ΐ͏తͳײ͡Ͱ͢ɻ gradle.properties 3/3
build.gradleΛฤू͢Δ android { … dexOptions { javaMaxHeapSize “2g” preDexLibraries true
} productFlavors { lollipop { // multidexڥͰ͔ͳΓૣ͘ͳΓ·͢ɻ minSdkVersion 21 } } }
ͱɺΑ͋͘ΔͭΛ· ͱΊͯΈ·ͨ͠ɻ
ͰϏϧυͯ͠Έ·͠ΐ͏ɻ
ϓϩδΣΫτ͜Μͳײ͡Ͱ͢ • Gradle 3.1 • Android Studio 2.2 • Kotlin1.0.4
Ϛγϯͪ͜Β • MacBook Pro 13 Early 2015 • Core i5
• RAM 8GB • SSD 256GB
લड़ͷઃఆΛԿ͠ͳ͍ ߹ͷ݁Ռͪ͜Β 1. 4 mins 32.036 secs 2. 3 mins
3.593 secs 3. 3 mins 13.68 secs 4. 2 mins 59.793 secs 5. 2 mins 49.458 secs
݁Ռͪ͜Β 1. 3 mins 39.298 secs 2. 1 mins 36.881
secs 3. 1 mins 33.334 secs 4. 1 mins 38.63 secs 5. 1 mins 36.758 secs
ૣ͘ɺɺɺͳΓ·ͨ͠Ͷʁ
͋͘·Ͱ૬ରతʹૣ͘ͳͬͨ ͷͰ͋Γɺීஈ͔Β͜Εͬ ͺΓগ͠ਏ͍Ͱ͢Ͷʁ
ಥવͰ͕͢͜͜Ͱฐࣾͷ ٻਓใΛݟͯΈ·͠ΐ͏
ڧͦ͏ͳ֎ࠃਓͷํ͕͍ࣸͬͯ·͢Ͷɻ ͏গ͠ݟͯΈ·͠ΐ͏ɻ
࡞ۀޮͷ্͕ΔͷʹͰ͖Δ͚ͩࢿ Λߦͳ͍ͬͯΔΑ͏Ͱ͢Ͷɻ
ͱ͍͏͜ͱͰ
͜ΜͳϚγϯΛ༻ҙͯ͠Β͍·ͨ͠ɻ ձࣾෛ୲࠷ߴο • iMac 5K Late2015 • Core i7(4GHz) •
RAM 64GB • SSD 512GB
build.gradleΛฤू͢Δ android { … dexOptions { javaMaxHeapSize “32g” preDexLibraries true
} productFlavors { lollipop { // multidexڥͰ͔ͳΓૣ͘ͳΓ·͢ɻ minSdkVersion 21 } } }
લड़ͷઃఆΛԿ͠ͳ͍ ߹ͷ݁Ռͪ͜Β 1. 1 mins 7.58 secs 2. 2 mins
51.058 secs 3. 1 mins 19.977 secs 4. 1 mins 5.356 secs 5. 37.249 secs
݁Ռͪ͜Β 1. 1 mins 10.933 secs 2. 20.561 secs 3.
19.172 secs 4. 20.31 secs 5. 18.745 secs
ૣ͘ͳΓ·ͨ͠Ͷʁ
݁ -> Ϗϧυ͓ۚͰૣ͘Ͱ͖Δ
͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ