apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    defaultConfig {
        applicationId "top.defaults.gradientdrawabletuner"
        minSdkVersion 16
        targetSdkVersion 27
        versionCode 3
        versionName "1.1"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

        javaCompileOptions {
            annotationProcessorOptions {
                arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]
            }
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    signingConfigs {
        release
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.release
        }
    }
    dataBinding {
        enabled = true
    }
    def isRunningOnTravis = System.getenv("CI") == "true"

    if (isRunningOnTravis) {
        // configure keystore
        signingConfigs.release.storeFile = file("../myshape.jks")
        signingConfigs.release.storePassword = System.getenv("keystore_password")
        signingConfigs.release.keyAlias = System.getenv("keystore_alias")
        signingConfigs.release.keyPassword = System.getenv("keystore_alias_password")
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    implementation 'com.android.support:recyclerview-v7:27.1.1'
    implementation 'android.arch.lifecycle:extensions:1.1.1'
    def room_version = "1.1.1"
    implementation "android.arch.persistence.room:runtime:$room_version"
    annotationProcessor "android.arch.persistence.room:compiler:$room_version"
    implementation "android.arch.persistence.room:rxjava2:$room_version"
    implementation 'com.google.android:flexbox:1.0.0'
    implementation 'com.jakewharton:butterknife:8.7.0'
    implementation 'org.dom4j:dom4j:2.1.1'
    implementation 'com.github.duanhong169:colorpicker:1.1.1'
    implementation 'com.github.duanhong169:checkerboarddrawable:1.0.2'
    implementation 'com.github.duanhong169:text-button:1.0.5'
    implementation 'com.github.duanhong169:drawabletoolbox:1.0.4'
    implementation project(':annotations')
    annotationProcessor project(':compiler')
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.7.0'
    testImplementation 'junit:junit:4.12'
    debugImplementation 'com.amitshekhar.android:debug-db:1.0.4'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
