apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply from: "../maven_push.gradle"

android {
    compileSdkVersion 28


    defaultConfig {
        minSdkVersion 17
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility = '1.8'
        targetCompatibility = '1.8'
    }
    sourceSets {
        main {
            jniLibs.srcDirs = ['libs']
        }
    }

}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

    api(rootProject.ext.dependencies["ydl-ijkplayer-jjdxm"]) {
        exclude group: 'com.android.support', module: 'appcompat-v7'
    }

    if (rootProject.ext.dev_mode){
        //开发时使用
        api project(':ydl-platform')
    }else {
        //发布时使用
        api(rootProject.ext.dependencies["ydl-platform"]) {
            transitive = true
        }
    }

}

