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
3k
AssemblyScriptでライブラリコードの高速化をしてみる
gfx
5
3.2k
実践TypeScriptトークバトル
gfx
1
1.2k
歴史的経緯の説明 as code
gfx
7
2.8k
Elasticsearchによる 全文検索の実装 in Rails
gfx
6
9.6k
すばらしきGraphQLのSEKAIへようこそ
gfx
20
9.4k
マルチテナント・ウェブアプリケーションの実践
gfx
14
9.6k
How to choose the ORM on Android
gfx
1
4.3k
How Do We Get Along With Static Types
gfx
5
3.4k
Other Decks in Technology
See All in Technology
PFEM Online Feature Flag @ newmo
shinyaishitobi
2
270
新卒(ほぼ)専業Kagglerという選択肢
nocchi1
1
1.8k
あとはAIに任せて人間は自由に生きる
kentaro
3
1k
自治体職員がガバクラの AWS 閉域ネットワークを理解するのにやって良かった個人検証環境
takeda_h
2
360
MySQL HeatWave:サービス概要のご紹介
oracle4engineer
PRO
4
1.6k
夢の印税生活 / Life on Royalties
tmtms
0
270
モダンな現場と従来型の組織——そこに生じる "不整合" を解消してこそチームがパフォーマンスを発揮できる / Team-oriented Organization Design 20250825
mtx2s
2
290
Engineering Failure-Resilient Systems
infraplumber0
0
130
形式手法特論:位相空間としての並行プログラミング #kernelvm / Kernel VM Study Tokyo 18th
ytaka23
3
1.6k
[CVPR2025論文読み会] Linguistics-aware Masked Image Modelingfor Self-supervised Scene Text Recognition
s_aiueo32
0
200
Oracle Base Database Service:サービス概要のご紹介
oracle4engineer
PRO
2
20k
Backboneとしてのtimm2025
yu4u
3
1.2k
Featured
See All Featured
Intergalactic Javascript Robots from Outer Space
tanoku
272
27k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.6k
Facilitating Awesome Meetings
lara
55
6.5k
Balancing Empowerment & Direction
lara
2
580
A Modern Web Designer's Workflow
chriscoyier
695
190k
How STYLIGHT went responsive
nonsquared
100
5.7k
The Invisible Side of Design
smashingmag
301
51k
Six Lessons from altMBA
skipperchong
28
4k
The Language of Interfaces
destraynor
160
25k
Designing Experiences People Love
moore
142
24k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
33
2.4k
Imperfection Machines: The Place of Print at Facebook
scottboms
268
13k
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Λ࠾༻͍ͯ͠ΔͷͰ ໘ͰվળͷݟࠐΈ͕͋Δ