apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
    compileSdkVersion = 28
    buildToolsVersion ANDROID_BUILD_TOOLS_VERSION

    defaultConfig {
        minSdkVersion ANDROID_MIN_SDK_VERSION.toInteger()
        targetSdkVersion ANDROID_SDK_VERSION.toInteger()
        versionCode SYBOTAN_CODE.toInteger()
        versionName SYBOTAN_ANDROID_VERSION

        testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
        vectorDrawables.useSupportLibrary = true
    }

    buildTypes {
        release {
            // minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    // 解决lint语法检查错误（kotlin语法无法通过lint）
    lintOptions {
        abortOnError false
    }

    kotlinOptions {
        jvmTarget = JVM_TARGET
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    implementation project(path: ':sybotan-android-base')
    testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: JUNIT_VERSION
    androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // kotlin 依赖
    implementation group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib-jdk8', version: KOTLIN_VERSION

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    //noinspection GradleDependency
    implementation 'com.squareup.retrofit2:retrofit:2.3.0'
    //noinspection GradleDependency
    implementation 'com.squareup.retrofit2:converter-gson:2.3.0'

    // android支持
    implementation group: 'com.android.support', name: 'appcompat-v7', version: ANDROID_SUPPORT_VERSION
    implementation group: 'com.android.support', name: 'design', version: ANDROID_SUPPORT_VERSION
    implementation group: 'com.android.support', name: 'support-v4', version: ANDROID_SUPPORT_VERSION
    implementation group: 'com.android.support.constraint', name: 'constraint-layout', version: CONSTRAINT_VERSION

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // anko依赖
    // https://mvnrepository.com/artifact/org.jetbrains.anko/anko-commons
    implementation group: 'org.jetbrains.anko', name: 'anko-commons', version: ANKO_VERSION

    //noinspection GradleDependency
    implementation 'com.squareup.retrofit2:converter-gson:2.3.0'

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Sybotan依赖
//    implementation group: "cn.sagacloud", name: "sybotan-android-base", version: SYBOTAN_ANDROID_VERSION
//    implementation group: "cn.sagacloud", name: "sybotan-android-graphy", version: SYBOTAN_ANDROID_VERSION
//    implementation group: "cn.sagacloud", name: "sybotan-android-database", version: SYBOTAN_ANDROID_VERSION
    implementation group: 'cn.sagacloud', name: 'saga-kotlin-base', version: SAGA_KOTLIN_VERSION
    implementation group: 'cn.sagacloud', name: 'saga-kotlin-database', version: SAGA_KOTLIN_VERSION
    implementation project(':cadengine')
    implementation project(':sybotan-android-graphy')


    //noinspection GradleDependency
    implementation 'org.greenrobot:eventbus:3.0.0'
}
