apply from: rootProject.file('cc-settings.gradle')
apply plugin: 'com.jakewharton.butterknife'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
android {
    compileSdkVersion rootProject.ext.android["compileSdkVersion"]

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    defaultConfig {
        if (project.ext.runAsApp) {
            applicationId "com.gingersoft.gsa.delivery_pick_mode"
        }
        minSdkVersion rootProject.ext.android["minSdkVersion"]
        targetSdkVersion rootProject.ext.android["targetSdkVersion"]
        versionCode rootProject.ext.android["versionCode"]
        versionName rootProject.ext.android["versionName"]

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
    }
    resourcePrefix "otherOrder"
    dataBinding {
        enabled = true
    }
    buildTypes {
        debug {
            buildConfigField "boolean", "LOG_DEBUG", "true"
            buildConfigField "boolean", "USE_CANARY", "true"
            minifyEnabled false
            proguardFiles 'proguard.cfg'
        }
        release {
            buildConfigField "boolean", "LOG_DEBUG", "false"
            buildConfigField "boolean", "USE_CANARY", "false"
            minifyEnabled false
            zipAlignEnabled false
            proguardFiles 'proguard.cfg'
        }
    }
}
kapt {
    useBuildCache = true
}
dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    kapt rootProject.ext.dependencies["dagger2-compiler"]
    kapt rootProject.ext.dependencies["butterknife-compiler"]
    implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
    // alternatively, just LiveData
    implementation "android.arch.lifecycle:livedata:1.1.1"
    implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.0-alpha01"
    //协程
    implementation 'com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter:0.9.2'
    //gson和scalars轉換器
    implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
    implementation 'com.squareup.retrofit2:converter-scalars:2.5.0'

    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'com.ethanhua:skeleton:1.1.2'
    implementation 'io.supercharge:shimmerlayout:2.1.0'
    if (project.ext.runAsApp) {
        addComponent 'component-print'
    }
}
