apply plugin: 'com.android.application'
apply plugin: 'kotlin-android' // apply kotlin android plugin
apply plugin: 'kotlin-android-extensions'
def anko_version = '0.10.4'
def kotlin_version = '1.2.31'
android {
    compileSdkVersion 27
    //buildToolsVersion '27.0.3'
    defaultConfig {
        applicationId "com.jkanetwork.st.frasesdeanime"
        minSdkVersion 17
        targetSdkVersion 27
        // Sube automáticamente la build en cada compilacion
        def versionPropsFile = file('versioncode.count')
        def Properties versionProps = new Properties()
        versionProps.load(new FileInputStream(versionPropsFile))
        def code = versionProps['VERSION_CODE'].toInteger() + 1
        versionProps['VERSION_CODE'] = code.toString()
        versionProps.store(versionPropsFile.newWriter(), null)
        // Fin de subir automáticamente la build en cada compilación
        versionCode code
        versionName "1.4.3"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            shrinkResources false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors {
    }
}

sourceSets {
    main.java.srcDirs += 'src/main/kotlin'
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    /*androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })*/
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    implementation "org.jetbrains.anko:anko-sqlite:$anko_version"
    implementation "org.jetbrains.anko:anko-commons:$anko_version"
    // Anko Layouts
    implementation "org.jetbrains.anko:anko-sdk25:$anko_version"
    // sdk15, sdk19, sdk21, sdk23 are also available
    implementation "org.jetbrains.anko:anko-appcompat-v7:$anko_version"
    // Coroutine listeners for Anko Layouts
    implementation "org.jetbrains.anko:anko-sdk25-coroutines:$anko_version"
    implementation "org.jetbrains.anko:anko-appcompat-v7-coroutines:$anko_version"
    implementation 'com.github.mirrajabi:kotlin-preferences-extensions:1.0'
    implementation 'com.android.support:recyclerview-v7:27.1.1'
    implementation 'com.google.android.gms:play-services-ads:15.0.1'
    //testImplementation 'junit:junit:4.12'
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}