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.1k
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.5k
AssemblyScriptでライブラリコードの高速化をしてみる
gfx
5
2.6k
実践TypeScriptトークバトル
gfx
1
940
歴史的経緯の説明 as code
gfx
7
2.5k
Elasticsearchによる 全文検索の実装 in Rails
gfx
5
9k
すばらしきGraphQLのSEKAIへようこそ
gfx
20
8.9k
マルチテナント・ウェブアプリケーションの実践
gfx
14
9.2k
How to choose the ORM on Android
gfx
1
4k
How Do We Get Along With Static Types
gfx
5
3.2k
Other Decks in Technology
See All in Technology
GitHub最新情報キャッチアップ 2024年3月
dzeyelid
16
3.2k
戦略的DDDを実践するための跳躍力 / OOC 2024
pictiny
6
3.9k
チーム単位で保守性を高める:独自指標と向上にむけた実践
tarappo
0
300
オブジェクト指向宗教史
tanakahisateru
13
12k
オブジェクト指向CSSが叶えたかったことと、CSSのいま / The aims of Object-oriented CSS and the current state of CSS usage
shinkufencer
11
3.6k
技術広報経験0のEMがエンジニアブランディングをはじめてみた
coconala_engineer
1
130
Oracle Database で機械学習を始めよう! Oracle Machine Learning
oracle4engineer
PRO
1
140
既存プロセスからの脱却と変化に適応するために必要なこと
cybozuinsideout
PRO
2
170
ビジネスロジックを「型」で表現するOOPのための関数型DDD / Functional And Type-Safe DDD for OOP
yuitosato
29
12k
「XX試験の環境作ってよ」と言われた時によく使うAWSのソリューションについて
bun913
0
120
LLMプロダクト事業の立ち上げにおける挑戦
layerx
PRO
7
1.4k
KubeCon EU: Unlocking new Platform Experiences with Open Interfaces
salaboy
1
370
Featured
See All Featured
Designing Experiences People Love
moore
135
23k
A Tale of Four Properties
chriscoyier
150
22k
Into the Great Unknown - MozCon
thekraken
10
830
Happy Clients
brianwarren
91
6.3k
Building an army of robots
kneath
300
41k
Build your cross-platform service in a week with App Engine
jlugia
223
17k
Statistics for Hackers
jakevdp
789
220k
Navigating Team Friction
lara
177
13k
Fireside Chat
paigeccino
19
2.6k
Keith and Marios Guide to Fast Websites
keithpitt
407
22k
Building a Scalable Design System with Sketch
lauravandoore
455
32k
What’s in a name? Adding method to the madness
productmarketing
PRO
14
2.6k
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Λ࠾༻͍ͯ͠ΔͷͰ ໘ͰվળͷݟࠐΈ͕͋Δ