apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'

android {
    compileSdkVersion 28

    defaultConfig {
        minSdkVersion 11
        targetSdkVersion 28

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

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

}

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

    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support:design:28.0.0'

    //noinspection DifferentStdlibGradleVersion
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"

    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

repositories {
    mavenCentral()
}

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
        classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
    }
}

//--------------------------------------------------------------------------------------------------

ext {
    bintrayRepo = 'maven'
    bintrayName = 'PrimeAdapter'
    orgName = 'aminography'

    publishedGroupId = 'com.aminography'
    artifact = 'primeadapter'
    libraryVersion = "1.0.14"

    libraryName = 'PrimeAdapter'
    libraryDescription = 'PrimeAdapter makes working with RecyclerView easier.'

    siteUrl = 'https://github.com/aminography/PrimeAdapter'
    gitUrl = 'https://github.com/aminography/PrimeAdapter.git'

    developerId = 'aminography'
    developerName = 'Mohammad Amin Hassani'
    developerEmail = 'aminography@gmail.com'

    licenseName = 'The Apache Software License, Version 2.0'
    licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
    allLicenses = ["Apache-2.0"]
}

apply from: rootProject.file('gradle/install.gradle')
apply from: rootProject.file('gradle/bintray-android.gradle')
