plugins {
    id 'com.android.library'
}

android {
    compileSdkVersion 30

    defaultConfig {
        minSdkVersion 16
        targetSdkVersion 30

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

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    namespace 'com.aghajari.rlottie.glide'
}

dependencies {
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

    implementation project(':AXrLottie')

    implementation "com.github.bumptech.glide:glide:4.14.0"
    annotationProcessor "com.github.bumptech.glide:compiler:4.12.0"
}

//// PUBLISH
//
//apply plugin: 'maven'
//apply plugin: 'maven-publish'
//apply plugin: 'signing'
//
//task sourcesJar(type: Jar) {
//    from android.sourceSets.main.java.srcDirs
//    classifier = 'sources'
//}
//
//task javadoc(type: Javadoc) {
//    source = android.sourceSets.main.java.srcDirs
//    classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
//}
//
//afterEvaluate {
//    javadoc.classpath += files(android.libraryVariants.collect { variant ->
//        variant.javaCompileProvider.get().classpath.files
//    })
//}
//
//task javadocJar(type: Jar, dependsOn: javadoc) {
//    classifier = 'javadoc'
//    from javadoc.destinationDir
//}
//
//artifacts {
//    archives javadocJar
//    archives sourcesJar
//}
//
//signing {
//    useInMemoryPgpKeys(
//            rootProject.ext["signing.keyId"],
//            rootProject.ext["signing.key"],
//            rootProject.ext["signing.password"],
//    )
//    sign publishing.publications
//}
//
//tasks.withType(Javadoc) {
//    options.addStringOption('Xdoclint:none', '-quiet')
//    options.addStringOption('encoding', 'UTF-8')
//    options.addStringOption('charSet', 'UTF-8')
//}
//
//def artifact = new Properties()
//artifact.load(new FileInputStream("deploy.settings"))
//
//version = artifact.version
//group = artifact.groupId
//archivesBaseName = 'AXrLottieGlideDecoder'
//
//afterEvaluate {
//    publishing {
//        publications {
//            release(MavenPublication) {
//                groupId artifact.groupId
//                artifactId 'AXrLottieGlideDecoder'
//                version artifact.version
//                from components.release
//
//                pom {
//                    name = 'AXrLottieGlideDecoder'
//                    packaging = 'aar'
//                    description = 'AXrLottieGlideDecoder is a Glide integration library for displaying AXrLottieDrawable (AXrLottie).'
//                    url = artifact.siteUrl
//
//                    scm {
//                        connection = artifact.gitUrl
//                        developerConnection = artifact.gitUrl
//                        url = artifact.siteUrl
//                    }
//
//                    licenses {
//                        license {
//                            name = 'The Apache License, Version 2.0'
//                            url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
//                        }
//                    }
//
//                    developers {
//                        developer {
//                            id = 'Aghajari'
//                            name = 'AmirHossein Aghajari'
//                            email = 'amirhossein.aghajari.82@gmail.com'
//                        }
//                    }
//                }
//            }
//        }
//    }
//}
