plugins {
    id 'com.android.library'
    id 'kotlin-android'
}

ext {
    bintrayRepo = 'Arch' // Repo name in bintray dashboard
    bintrayName = 'com.fededri.arch' // package name of the bintray repo

    publishedGroupId = 'com.fededri.arch'   // this is the ID we want to see in implementation line
    libraryName = 'arch'     // this is the module name of library
    artifact = 'arch'        // this is the artifact we want to see in implementation line

    libraryDescription = 'Android library to architecture your app following functional concepts, state management, ViewModels and coroutines' // description of library

    siteUrl = 'https://github.com/fededri/Arch'
    gitUrl = 'https://github.com/fededri/Arch.git'

    libraryVersion = '1.0.0-alpha02'      // library version

    developerId = 'fededri'
    developerName = 'Federico Miguel Angel Torres'
    developerEmail = 'federico.ma.torres@gmail.com'

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



android {
    compileSdkVersion 30
    buildToolsVersion "30.0.2"

    defaultConfig {
        minSdkVersion 21
        targetSdkVersion 30
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        consumerProguardFiles "consumer-rules.pro"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }
}

dependencies {

    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation 'androidx.core:core-ktx:1.3.2'
    implementation 'androidx.appcompat:appcompat:1.2.0'
    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'

    //Coroutines
    api 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.0'
    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0'

    //Timber
    implementation 'com.jakewharton.timber:timber:4.7.1'
}

apply from: 'publish.gradle'

tasks.withType(Javadoc).all {
    enabled = false
}