apply plugin: 'android-sdk-manager'
apply plugin: 'com.android.library'
apply plugin: 'me.tatarka.retrolambda'
apply plugin: 'maven'

android {
    compileSdkVersion 19
    buildToolsVersion "22.0.1"

    defaultConfig {
        minSdkVersion 15
        targetSdkVersion 19
        renderscriptTargetApi 19
        renderscriptSupportModeEnabled true
        versionCode 1
        versionName project.version
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }

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

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    lintOptions {
        checkReleaseBuilds false
        abortOnError false
    }

    sourceSets {
        main {
            assets.srcDirs = ['assets']
        }
        instrumentTest.setRoot('src/test')
    }

    packagingOptions {
        exclude 'META-INF/services/javax.annotation.processing.Processor'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
        exclude 'LICENSE.txt'
        exclude 'builddef.lst'
    }

}

retrolambda {
    javaVersion JavaVersion.VERSION_1_7
}

apply from: "${rootDir}/gradle/fixTestJavaResourcesMissing.gradle"


dependencies {
    compile 'com.android.support:support-v4:22.2.0'
    compile 'com.android.support:support-annotations:22.2.0'
    compile 'org.apache.commons:commons-lang3:3.3.2'
    compile 'io.reactivex:rxandroid:0.25.0'
    compile 'io.reactivex:rxjava-async-util:0.21.0'
    testCompile 'com.android.support:support-v8:19.0.1'
    testCompile 'org.mockito:mockito-all:1.9.5'
    testCompile 'org.hamcrest:hamcrest-integration:1.1'
    testCompile 'org.hamcrest:hamcrest-core:1.1'
    testCompile 'org.hamcrest:hamcrest-library:1.1'
    testCompile 'org.robolectric:robolectric:3.0'
    testCompile 'org.robolectric:shadows-support-v4:3.0'
    testCompile ('com.squareup:fest-android:1.0.8') {
        exclude(module: 'support-v4')
    }
    testCompile 'org.easytesting:fest-assert:1.4'
    testCompile 'com.googlecode.catch-exception:catch-exception:1.0.4'
    testCompile('junit:junit:4.11') {
        exclude module: 'hamcrest-core'
    }
}

tasks.withType(JavaCompile) {
    options.encoding = 'UTF-8'
}

apply from: rootProject.file('gradle/mvn-publish.gradle')
