apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'

ext {
    bintrayRepo = 'DaggerViewModel'
    bintrayName = 'daggerviewmodel'

    publishedGroupId = 'com.alexfacciorusso'
    libraryName = 'daggerviewmodel'
    artifact = 'daggerviewmodel'

    libraryDescription = 'An integration Module for injecting Google Architecture Components\' ViewModel into Dagger2-injected Android components.'

    siteUrl = 'https://github.com/alexfacciorusso/DaggerViewModel'
    gitUrl = 'https://github.com/alexfacciorusso/DaggerViewModel.git'

    libraryVersion = '0.2.0'

    developerId = 'alexfacciorusso'
    developerName = 'Alex Facciorusso'
    developerEmail = 'alexfacciorusso93@gmail.com'

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

android {
    compileSdkVersion 28

    defaultConfig {
        minSdkVersion 14
        targetSdkVersion 28
        versionCode 3
        versionName libraryVersion

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

    }

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

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

    api "com.google.dagger:dagger:$dagger_version"
    kapt "com.google.dagger:dagger-compiler:$dagger_version"

    api "androidx.lifecycle:lifecycle-runtime:$lifecycle_version"
    implementation "androidx.lifecycle:lifecycle-extensions:$arch_version"
    kapt "androidx.lifecycle:lifecycle-compiler:$arch_version"

    testImplementation "junit:junit:$junit_version"
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

}
repositories {
    mavenCentral()
}

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

apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'
