gradleëœ •ˆë“œëœ‌´ë“œ •± 빌드•ê¸°

  • View
    3.113

  • Download
    3

Embed Size (px)

Text of gradleëœ •ˆë“œëœ‌´ë“œ...

  • gradle 2015.01.22

  • ?

    : PlayStore, T-Store,

    : , ,

    : /, , ,

  • ?

  • Google I/O 2013

    Intelli J Android Studio gradle Android

  • gradle?

    Ant Maven Groovy

  • gradle?

    Groovy DSL(Domain Specific Language)

    Gradle Wrapper Gradle

  • Migration Android Studio 1.0

    Migration

  • Migration

    Android Studio

  • /settings.gradle

  • /build.gradle

    gradle (repository, plugin, )

  • //build.gradle

    ApplicationId:

    minifyEnabled: ProGuard

  • //build.gradle Android KitKat Java 1.7

    ( , catch, switch String )

    compileSdkVersion 19

    buildToolsVersion 19.0.0

    compileOptions {

    sourceCompatibility JavaVersion.VERSION_1_7

    targetCompatibility JavaVersion.VERSION_1_7

    }

  • //build.gradle

    compile project(:) -

    compile -

    compile files() -

  • gradle

    $ gradle

    gradlew

    $ gradlew

    Android Studio gradle

  • task(Variant, Build Type, Product Flavor)

    $ gradlew assemble

    task

    $ gradlew assemble task

    test task

    $ gradlew build

  • Build Variants

    .

    Build Variant = Build Type + Product Flavor

  • Build Variants

  • Build Type

    android { buildTypes { debug {

    } release {

    } }

    }

  • Build Type debug release:

    , , ,

    , Logcat , apk , ,

    versionCode

    BuildConfig /

  • Build Type AndroidManifest.xml versionCode

    Groovy DSL Gradle task

    http://stackoverflow.com/a/17525195/2677760

  • Build Type signingConfigs

    android { signingConfigs {

    } }

  • Product Flavor

    android { productFlavors { tstore {

    } playstore {

    } }

    }

  • Product Flavor

    ,

    , , ,

    git tag branch versionName

  • Product Flavor git tag versionName

    Groovy DSL

    http://stackoverflow.com/a/18021756/2677760

  • http://tools.android.com/tech-docs/new-build-system/user-guide

    http://tools.android.com/build/gradleplugin

    http://tools.android.com/tech-docs/new-build-system/migrating-to-1-0-0

    http://developer.android.com/tools/building/configuring-gradle.html

    http://developer.android.com/tools/building/plugin-for-gradle.html

    http://blog.proinlab.com/?p=1412

    http://toastdroid.com/2014/03/28/customizing-your-build-with-gradle/

  • .

    han@manjong.org