apply plugin: 'com.android.library'
apply plugin: 'maven'
apply plugin: 'signing'

version = "1.0.8"
group = "com.eftimoff"

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.2"

    defaultConfig {
        minSdkVersion 9
        targetSdkVersion 21
        versionCode 1
        versionName "1.0"
    }
}

configurations {
    archives {
        extendsFrom configurations.default
    }
}

signing {
    required { has("release") && gradle.taskGraph.hasTask("uploadArchives") }
    sign configurations.archives
}

uploadArchives {
    configuration = configurations.archives
    repositories.mavenDeployer {
        beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

        repository(url: sonatypeRepo) {
            authentication(userName: sonatypeUsername,
                    password: sonatypePassword)
        }

        pom.project {
            name 'Android Path View Library'
            packaging 'aar'
            description 'Android view that animate the both path from constructed path or from svg'
            url 'https://github.com/geftimov/android-pathview'

            scm {
                url 'scm:git@github.com:geftimov/android-pathview.git'
                connection 'scm:git@github.com:geftimov/android-pathview.git'
                developerConnection 'scm:git@github.com:geftimov/android-pathview.git'
            }

            licenses {
                license {
                    name 'The Apache Software License, Version 2.0'
                    url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
                    distribution 'repo'
                }
            }

            developers {
                developer {
                    id 'geftimov'
                    name 'Georgi Eftimov'
                    email 'jokatavr@gmail.com'
                }
            }
        }
    }
}

dependencies {
    compile files('libs/androidsvg-1.2.1.jar')
    compile 'com.nineoldandroids:library:2.4.0'
}
