buildscript {
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'
    }
}

plugins {
    id "com.jfrog.bintray" version "1.7.3"
    id "com.github.dcendents.android-maven" version "2.0"
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

apply plugin: 'com.android.library'
apply from: 'bintray.gradle'
apply from: 'maven.gradle'

android {
    compileSdkVersion 26



    defaultConfig {
        minSdkVersion 14
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

    }

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

    testOptions {
        unitTests {
            includeAndroidResources = true
        }
    }

}

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

    compileOnly 'com.android.support:appcompat-v7:26.1.0'

    testImplementation 'junit:junit:4.12'
    testImplementation 'org.mockito:mockito-core:1.10.19'
    testImplementation "org.robolectric:robolectric:3.7"

    testImplementation "org.powermock:powermock-module-junit4:1.6.6"
    testImplementation "org.powermock:powermock-module-junit4-rule:1.6.6"
    testImplementation "org.powermock:powermock-api-mockito:1.6.6"
    testImplementation "org.powermock:powermock-classloading-xstream:1.6.6"

}

if(file('../../../LICENSE.md').exists() && plugins.hasPlugin("com.github.hierynomus.license")){
    license {
        header = file('../../../LICENSE.md')
    }
    preBuild.dependsOn licenseFormat
}