apply plugin: 'com.android.library'

apply plugin: 'kotlin-android'

apply plugin: 'com.github.dcendents.android-maven'

apply plugin: "de.mannodermaus.android-junit5"

group='com.github.donfuxx'

android {
    compileSdkVersion 28


    defaultConfig {
        minSdkVersion 21
        targetSdkVersion 28
        versionCode 1
        versionName "1.6.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        testInstrumentationRunnerArgument "runnerBuilder", "de.mannodermaus.junit5.AndroidJUnit5Builder"
    }

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

    sourceSets {
        String sharedTestDir = 'src/sharedTest/java'
        test {
            java.srcDir sharedTestDir
        }
        androidTest {
            java.srcDir sharedTestDir
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    resourcePrefix 'mockinizer_'

    packagingOptions {
        exclude "META-INF/LICENSE*"
    }

}

dependencies {
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlin_coroutines_version"
    implementation "com.squareup.okhttp3:mockwebserver:$mockserver_version"
    implementation "com.squareup.okhttp3:okhttp:$mockserver_version"
    implementation "com.squareup.okhttp3:okhttp-tls:$mockserver_version"
    implementation "androidx.appcompat:appcompat:$appcompat_version"

    testImplementation "junit:junit:$junit_version"
    testImplementation "org.junit.jupiter:junit-jupiter-api:$junit5_version"
    testImplementation "org.junit.jupiter:junit-jupiter-params:$junit5_version"
    testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:$mockito_kotlin_version"
    testImplementation "org.assertj:assertj-core:$assertj_version"

    testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit5_version"

    androidTestImplementation "com.squareup.retrofit2:retrofit:$retrofit_version"
    androidTestImplementation "com.squareup.retrofit2:converter-gson:$retrofit_version"
    androidTestImplementation "com.squareup.okhttp3:logging-interceptor:$logginginterceptor_version"
    androidTestImplementation "com.squareup.okhttp3:mockwebserver:$mockserver_version"

    androidTestImplementation 'com.jakewharton.espresso:okhttp3-idling-resource:1.0.0'
    androidTestImplementation "androidx.test:runner:$testrunner_version"
    androidTestImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:$mockito_kotlin_version"
    androidTestImplementation "org.junit.jupiter:junit-jupiter-api:$junit5_version"
    androidTestImplementation "org.junit.jupiter:junit-jupiter-params:$junit5_version"
    androidTestImplementation "org.assertj:assertj-core:$assertj_version"
    androidTestImplementation "de.mannodermaus.junit5:android-test-core:$mannodermaus_version"
    androidTestRuntimeOnly "de.mannodermaus.junit5:android-test-runner:$mannodermaus_version"
}

install {
    repositories.mavenInstaller {
        pom.groupId = "com.github.donfuxx"
        pom.version = "1.6.0.local"
        pom.artifactId = project.name
    }
}
