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
Introduction to Gradle 2.0
Search
FUJI Goro
September 24, 2014
Technology
1
4.3k
Introduction to Gradle 2.0
potatotips #9 at Fablic の発表資料です
FUJI Goro
September 24, 2014
Tweet
Share
More Decks by FUJI Goro
See All by FUJI Goro
How to Boost Your Code with WebAssembly
gfx
2
2.9k
AssemblyScriptでライブラリコードの高速化をしてみる
gfx
5
3.1k
実践TypeScriptトークバトル
gfx
1
1.1k
歴史的経緯の説明 as code
gfx
7
2.8k
Elasticsearchによる 全文検索の実装 in Rails
gfx
6
9.4k
すばらしきGraphQLのSEKAIへようこそ
gfx
20
9.3k
マルチテナント・ウェブアプリケーションの実践
gfx
14
9.5k
How to choose the ORM on Android
gfx
1
4.2k
How Do We Get Along With Static Types
gfx
5
3.3k
Other Decks in Technology
See All in Technology
設計を積み重ねてシステムを刷新する
sansantech
PRO
0
150
1行のコードから社会課題の解決へ: EMの探究、事業・技術・組織を紡ぐ実践知 / EM Conf 2025
9ma3r
8
3.3k
Goで作って学ぶWebSocket
ryuichi1208
3
2.6k
EDRの検知の仕組みと検知回避について
chayakonanaika
11
4.5k
OSS構成管理ツールCMDBuildを使ったAWSリソース管理の自動化
satorufunai
0
570
内製化を加速させるlaC活用術
nrinetcom
PRO
2
130
データエンジニアリング領域におけるDuckDBのユースケース
chanyou0311
8
2.1k
AIエージェント入門
minorun365
PRO
30
16k
MIMEと文字コードの闇
hirachan
2
1.4k
依存パッケージの更新はコツコツが勝つコツ! / phpcon_nagoya2025
blue_goheimochi
3
200
AIエージェント元年
shukob
0
150
「正しく」失敗できる チームの作り方 〜リアルな事例から紐解く失敗を恐れない組織とは〜 / A team that can fail correctly
i35_267
4
780
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
40
2.5k
Side Projects
sachag
452
42k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
RailsConf 2023
tenderlove
29
1k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Rails Girls Zürich Keynote
gr2m
94
13k
How to Ace a Technical Interview
jacobian
276
23k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
27
1.9k
Product Roadmaps are Hard
iamctodd
PRO
50
11k
It's Worth the Effort
3n
184
28k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
30
2.2k
Transcript
Introduction to Gradle 2.0 potatotips #9 at Fablic, 2014/9/24 Fuji
Goro (gfx)
Myself • id:gfx (Fuji, Goro) • ΫοΫύουͷΤϯδχΞ • iOS /
Android྆ํΓ·͢ • ϚΠϒʔϜSwiftΛۃΊΔ͜ͱ • ࠷ۙϚγϯ͕ނোͯ͠σʔλϦΧόϦͰ͖ͳ͘ ͯڥ࡞Γͳ͓ͯ͠ਏ͔ͬͨɻϚγϯյΕΔ
Android Studio 0.8.11 2014/9/18 ϦϦʔε
Shipped with Android Gradle Plugin 0.13.0
! Depends on Gradle 2.1 and Groovy 2.3.6
Gradle 2.1
Gradle 2.1 • ৽͍͠pluginػߏ • https://plugins.gradle.org/ • نఆͷϝλใΛ͚ͭͯjcenterʹdeploy͢Δͱࢀর Ͱ͖ΔΑ͏ʹͳΔ •
pluginsϒϩοΫ • qualified idʹΑͬͯ҉ͷ͏ͪʹclasspathʹՃ͑Δ Έ
plugins { id 'com.github.forsety.adr' version '0.1' } apply plugin: 'com.android.application'
fully-qualified id no comma! no colon! before "apply"s Android pluginࣗମpluginsϒϩοΫͰࢦ ఆͰ͖ΔΑ͏ʹͦͷ͏ͪͳΔͱࢥΘΕΔ͕ ݱঢ়·ͩͰ͖ͳ͍ͷͰҎલͱ͓ͳ͡
Other features • Incremental Java compile (Android·ͩ…ʁʣ • Groovy 2.3.6
(Gradle 1.x Groovy 1.8.6) • Java8 support
Groovy 2.3.6
@CompileStatic ੩తܕ͖ͰίϯύΠϧ JavaฒʹരʹͳΔ
import groovy.transform.CompileStatic ! @CompileStatic int f(int a, int b) {
return a + b } ! def a = f(10, 20) // ܕਪޮ͘ println(a) import͕ඞਢ ASͩͱ͘ͳΔ
@CompileStaticͰมΘΔ͜ͱ • Gradle Pluginͷ࣮ߦ͕ߴʹͳΔ • ͨͩ͠ݴޠʮGroovyͷํݴʯʹͳΔ • ༻ײ͕͚ͬ͜͏ҧ͏ • Android
Gradle Pluginͷresource merge͘ ͳΔ…͔
·ͱΊ • Android Gradle Plugin 0.13ͰGradle 2.1Λ࠾ ༻ͨ͠ • Gradle
2.1pluginػߏ͕Ұ৽͞ΕͯΔͷͰ AndroidΤίγεςϜͰظײͷߴ·Γ͕͋Δ • Gradle 2.1Groovy 2.3.6Λ࠾༻͍ͯ͠ΔͷͰ ໘ͰվળͷݟࠐΈ͕͋Δ