apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply from: '../upload.gradle'

android {
    compileSdkVersion rootProject.ext.android["compileSdkVersion"]

    defaultConfig {
        minSdkVersion rootProject.ext.android["minSdkVersion_16"]
        targetSdkVersion rootProject.ext.android["targetSdkVersion"]
        versionCode rootProject.ext.android["versionCode"]
        versionName rootProject.ext.android["versionName"]

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        javaCompileOptions { annotationProcessorOptions { includeCompileClasspath = true } }
    }

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

    lintOptions {
        abortOnError false
    }

    /**
     * 支持ViewBinding
     */
    buildFeatures {
        //viewBinding = true
    }
}


dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    if (needKotlinV14()) {
        compileOnly rootProject.ext.dependencies["kotlin_v14"]
    } else {
        compileOnly rootProject.ext.dependencies["kotlin_v13"]
    }
    implementation rootProject.ext.dependencies["appcompat"]
    implementation rootProject.ext.dependencies["activity-ktx"]
    //sql
    implementation rootProject.ext.dependencies["wcdb"]
//    implementation rootProject.ext.dependencies["core-ktx"]
    implementation rootProject.ext.dependencies["auto_service"]
    kapt rootProject.ext.dependencies["auto_service"]
    //ktor
    implementation rootProject.ext.dependencies["ktor_server_core"]
    implementation rootProject.ext.dependencies["ktor_server_cio"]

    //此处需要使用api的形式 向上暴露内部api
    implementation project(':dokit')
    compileOnly project(':dokit-util')
}
repositories {
    mavenCentral()
}
