apply plugin: 'com.android.library'

android {
    compileSdkVersion 30

    defaultConfig {
        minSdkVersion 14
        targetSdkVersion 30
    }

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

    testOptions {
        unitTests.returnDefaultValues = true
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {
    api project(':dnssd')
    //api "com.github.andriydruk:dnssd:$mavenCentralVersion"

    // Transitively export that dependencies to other modules
    api 'io.reactivex.rxjava2:rxandroid:2.1.1'
    api 'io.reactivex.rxjava2:rxjava:2.2.21'
    api 'androidx.annotation:annotation:1.3.0'

    testImplementation 'junit:junit:4.13.2'
    // Last version that support Power Mock: https://github.com/powermock/powermock/wiki/Mockito#supported-versions
    testImplementation 'org.mockito:mockito-core:3.6.0'
    testImplementation ('org.powermock:powermock-api-mockito2:2.0.9') {
        exclude module: 'hamcrest-core'
        exclude module: 'objenesis'
    }
    testImplementation ('org.powermock:powermock-module-junit4:2.0.9') {
        exclude module: 'hamcrest-core'
        exclude module: 'objenesis'
    }
}

ext {
    PUBLISH_GROUP_ID = 'com.github.andriydruk'
    PUBLISH_ARTIFACT_ID = 'rx2dnssd'
}

apply from: "${rootProject.projectDir}/publish-module.gradle"
