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

android {
    compileSdkVersion 23
    buildToolsVersion "24.0.0"

    defaultConfig {
        minSdkVersion 11
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

task generateSourcesJar(type: Jar) {
    from android.sourceSets.main.java.srcDirs
    classifier 'sources'
}

task generateJavadocs(type: Javadoc) {
    source = android.sourceSets.main.java.srcDirs
    classpath += project.files(android.getBootClasspath()
            .join(File.pathSeparator))
}

task generateJavadocsJar(type: Jar) {
    from generateJavadocs.destinationDir
    classifier 'javadoc'
}

generateJavadocsJar.dependsOn generateJavadocs

artifacts {
    archives generateJavadocsJar
    archives generateSourcesJar
}
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())

group = 'com.github.anastr'
version = '1.0.3'

bintray {
    user = properties.getProperty("bintray.user")
    key = properties.getProperty("bintray.apikey")
    pkg {
        repo = 'maven'
        name = 'TargetView' // the name of the package in BinTray

        version {
            name = 'TargetView_1.0.3' // the name of your library project
            desc = 'Animation view to highlight a particular goals for Android'
            released  = new Date()
            vcsTag = '1.0.3' // the version
        }

        licenses = ['Apache-2.0']
        websiteUrl = 'https://github.com/anastr' // your website or whatever has documentation
        vcsUrl = 'https://github.com/anastr/SimpleTargetView.git'
    }
    configurations = ['archives']
}
