Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Introduction to Gradle 2.0

FUJI Goro
September 24, 2014

Introduction to Gradle 2.0

potatotips #9 at Fablic の発表資料です

FUJI Goro

September 24, 2014
Tweet

More Decks by FUJI Goro

Other Decks in Technology

Transcript

  1. Myself • id:gfx (Fuji, Goro) • ΫοΫύουͷΤϯδχΞ • iOS /

    Android྆ํ΍Γ·͢ • ϚΠϒʔϜ͸SwiftΛۃΊΔ͜ͱ • ࠷ۙϚγϯ͕ނোͯ͠σʔλϦΧόϦ΋Ͱ͖ͳ͘ ͯ؀ڥ࡞Γͳ͓ͯ͠ਏ͔ͬͨɻϚγϯ͸յΕΔ
  2. 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ϒϩοΫͰࢦ ఆͰ͖ΔΑ͏ʹͦͷ͏ͪͳΔͱࢥΘΕΔ͕ ݱঢ়͸·ͩͰ͖ͳ͍ͷͰҎલͱ͓ͳ͡
  3. import groovy.transform.CompileStatic ! @CompileStatic int f(int a, int b) {

    return a + b } ! def a = f(10, 20) // ܕਪ࿦͸ޮ͘ println(a) import͕ඞਢ ASͩͱ੺͘ͳΔ
  4. ·ͱΊ • Android Gradle Plugin 0.13Ͱ͸Gradle 2.1Λ࠾ ༻ͨ͠ • Gradle

    2.1͸pluginػߏ͕Ұ৽͞ΕͯΔͷͰ AndroidΤίγεςϜͰ΋ظ଴ײͷߴ·Γ͕͋Δ • Gradle 2.1͸Groovy 2.3.6Λ࠾༻͍ͯ͠ΔͷͰ଎ ౓໘ͰվળͷݟࠐΈ͕͋Δ