plugins {
    id 'com.android.library'
    id 'org.jetbrains.kotlin.android'
}
def version = '1.0.1'
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')

    api "by.gm_mediation.com:gromore-sdk:4.0.0.1"
    api "by.gm_mediation.com:pangle-adapter:5.1.0.2.0"
    api 'com.pangle.cn:ads-sdk-pro:5.1.0.2'

    //mintegral
    api("com.mbridge.msdk.support:videojs:16.3.27")
    api("com.mbridge.msdk.support:mbjscommon:16.3.27")
    api("com.mbridge.msdk.support:playercommon:16.3.27")
    api("com.mbridge.msdk.support:reward:16.3.27")
    api("com.mbridge.msdk.support:videocommon:16.3.27")
    api("com.mbridge.msdk.support:chinasame:16.3.27")
    api("com.mbridge.msdk.support:interstitialvideo:16.3.27")
    api("com.mbridge.msdk.support:mbnative:16.3.27")
    api("com.mbridge.msdk.support:nativeex:16.3.27")
    api("com.mbridge.msdk.support:mbnativeadvanced:16.3.27")
    api("com.mbridge.msdk.support:interstitial:16.3.27")
    api("com.mbridge.msdk.support:mbbanner:16.3.27")
    api("com.mbridge.msdk.support:mbsplash:16.3.27")
    api("com.mbridge.msdk.support:mbbid:16.3.27")
    api("com.mbridge.msdk.support:newinterstitial:16.3.27")
}