apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

android {
    compileSdkVersion COMPILE_SDK_VERSION as int
    buildToolsVersion BUILD_TOOLS_VERSION

    defaultConfig {
        minSdkVersion MIN_SDK_VERSION as int
        targetSdkVersion TARGET_SDK_VERSION as int
        versionCode LIBRARY_VERSION_CODE as int
        versionName LIBRARY_VERSION_NAME

        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    sourceSets {
        main.java.srcDirs += 'src/main/kotlin'
    }
    lintOptions {
        abortOnError false
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    packagingOptions {
        exclude 'META-INF/LICENSE.txt'
        exclude 'jsr305_annotations/Jsr305_annotations.gwt.xml'
    }
}

dependencies {
    implementation project(':playermanager')
    implementation project(':ima')

    // overwrite support libraries
    implementation "com.android.support:support-fragment:$APP_COMPAT_VERSION"
    implementation "com.android.support:customtabs:$APP_COMPAT_VERSION"
    implementation "com.android.support:recyclerview-v7:$APP_COMPAT_VERSION"
    implementation "com.android.support:support-v4:$APP_COMPAT_VERSION"
    implementation "com.android.support:support-compat:$APP_COMPAT_VERSION"
    implementation "com.android.support:support-annotations:$APP_COMPAT_VERSION"

    // exo palyer
    implementation "com.google.android.exoplayer:exoplayer:$EXO_PLAYER_VERSION"
    implementation "com.google.android.exoplayer:extension-okhttp:$EXO_PLAYER_VERSION"

    // ad
    implementation "com.google.ads.interactivemedia.v3:interactivemedia:$IMA_VERSION"
    implementation "com.google.android.gms:play-services-ads:$PLAY_SERVICE_VERSION"

    // kotlin
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$KOTLIN_VERSION"

    // di
    implementation "com.jakewharton:kotterknife:$KOTTER_KNIFE_VERSION"

    // debug
    implementation "com.jakewharton.timber:timber:$TIMBER_VERSION"
}

repositories {
    mavenCentral()
}