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

group='com.github.addisonelliott'

android {
    compileSdkVersion rootProject.compileSdkVersion
    buildToolsVersion rootProject.buildToolsVersion

    defaultConfig {
        minSdkVersion rootProject.minSdkVersion
        targetSdkVersion rootProject.compileSdkVersion
        versionCode 12
        versionName "3.1.9"
    }

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

    // Configure only for each module that uses Java 8 language features (either in its source code or through
    // dependencies).
    compileOptions {
        sourceCompatibility '1.8'
        targetCompatibility '1.8'
    }
}

// build a jar with source files
task sourcesJar(type: Jar) {
    from android.sourceSets.main.java.srcDirs
    classifier = 'sources'
}

task javadoc(type: Javadoc) {
    failOnError false
    source = android.sourceSets.main.java.srcDirs
    configurations.implementation.setCanBeResolved(true)
    classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) + configurations.implementation
}

task javadocJar(type: Jar, dependsOn: javadoc) {
    classifier = 'javadoc'
    from javadoc.destinationDir
}

artifacts {
    archives sourcesJar
    archives javadocJar
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    testImplementation 'junit:junit:4.13-beta-3'

    implementation "androidx.appcompat:appcompat:1.0.2"
    implementation "androidx.interpolator:interpolator:1.0.0"
    implementation "androidx.core:core:1.0.2"
    api 'com.github.addisonElliott:RippleDrawable:3.0.0'
}
