plugins {
    id 'com.android.library'
    id 'org.jetbrains.kotlin.android'
}
def version = '1.0.2'

def releaseTime() {
    return new Date().format("yyyy-MM-dd", TimeZone.getTimeZone("UTC"))
}

android {
    compileSdk = rootProject.ext.compileSdkVersion
    buildToolsVersion rootProject.ext.buildToolsVersion

    defaultConfig {
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        consumerProguardFiles "consumer-rules.pro"
    }


    buildTypes {
        debug {
            libraryVariants.all { variant ->
                variant.outputs.all { output ->
                    if (outputFile != null && outputFileName.endsWith('.aar')) {
                        outputFileName = "ad_gromore_${version}_${releaseTime()}_debug.aar"
                    }
                }
            }
        }
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            libraryVariants.all { variant ->
                variant.outputs.all { output ->
                    if (outputFile != null && outputFileName.endsWith('.aar')) {
                        outputFileName = "ad_gromore_${version}_${releaseTime()}_release.aar"
                    }
                }
            }
        }
    }


    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }

}


dependencies {

    implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')

    implementation project(':lib_ad_core')

    /*GroMore*/
//    api "com.pangle.cn:mediation-sdk:5.1.6.1"

    //融合SDK

//    implementation "com.pangle.cn:mediation-ks-adapter:3.3.40.3"//ks adapter
//
//    implementation "com.pangle.cn:mediation-gdt-adapter:4.514.1384.2" //gdt adapter
//
//    implementation "com.pangle.cn:mediation-admob-adapter:17.2.0.42"//admob adapter
//
//    implementation "com.pangle.cn:mediation-baidu-adapter:9.271.1"//baidu adapter
//
//    implementation "com.pangle.cn:mediation-klevin-adapter:2.11.0.3.4"//游可赢 adapter
//
//    implementation "com.pangle.cn:mediation-mintegral-adapter:16.4.17.1"//mintegral adapter
//
//    api "com.pangle.cn:mediation-sigmob-adapter:4.9.0.4"//sigmob adapter
//
//    implementation "com.pangle.cn:mediation-unity-adapter:4.3.0.10"//unity adapter
}