plugins {
    id "com.auth0.gradle.oss-library.android" version "0.17.1"
}

logger.lifecycle("Using version ${version} for ${name}")

oss {
    name 'jwtdecode'
    repository 'jwtdecode.android'
    organization 'auth0'
    description 'JWT Decoding library for Android'

    developers {
        auth0 {
            displayName = 'Auth0'
            email = 'oss@auth0.com'
        }
        lbalmaceda {
            displayName = 'Luciano Balmaceda'
            email = 'luciano.balmaceda@auth0.com'
        }
    }
}

android {
    compileSdkVersion 29

    defaultConfig {
        minSdkVersion 15
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"
    }
}

dependencies {
    implementation 'androidx.annotation:annotation:1.1.0'
    implementation 'com.google.code.gson:gson:2.8.9'

    testImplementation 'junit:junit:4.13'
    testImplementation 'org.hamcrest:java-hamcrest:2.0.0.0'
    testImplementation('org.robolectric:robolectric:4.3.1') {
        // https://github.com/robolectric/robolectric/issues/5245
        exclude group: 'com.google.auto.service', module: 'auto-service'
    }
    testImplementation 'org.mockito:mockito-core:3.2.4'
}

tasks.withType(Test) {
    jacoco.includeNoLocationClasses = true
    jacoco.excludes = ['jdk.internal.*']
}
