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

apply plugin: 'com.qxml.code.plugin'
//apply plugin: 'kotlin-kapt'

group 'com.qxml.sdk'

apply from: '../../gradleScript/privateKey.gradle'
apply from: '../../gradleScript/dokka.gradle'

android {
    compileSdkVersion android_compileSdkVersion.toInteger()
    buildToolsVersion android_buildToolsVersion

    defaultConfig {
        minSdkVersion android_minSdkVersion
        targetSdkVersion android_targetSdkVersion.toInteger()
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        consumerProguardFiles "consumer-rules.pro"

        javaCompileOptions {
            annotationProcessorOptions {
                arguments = [ RSA_PRIVATE_KEY : getQxmlPrivateKey() ]
            }
        }
    }

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

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

qxml {
    logEnable = true
    debugEnable = true
}

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation kotlin_stdlib
    testImplementation junit

    implementation support_v7
    implementation support_constraintLayout
    implementation support_recyclerview
    implementation support_design

    compileOnly support_lottie
    compileOnly support_fresco

    implementation deps.qxml.baseLib

    annotationProcessor deps.qxml.processorConstant

    api deps.qxml.constantConstant
    implementation deps.qxml.annotationsConstant

    androidTestImplementation test_runner
    androidTestImplementation test_core
}