apply plugin: 'com.android.library'
apply plugin: 'com.jfrog.bintray'
apply plugin: "com.github.dcendents.android-maven"
android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"

    defaultConfig {
        minSdkVersion 11
        targetSdkVersion 25
        versionCode 1
        versionName "1.1"

        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

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

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:25.1.0'
    testCompile 'junit:junit:4.12'
}
group = 'dyanamitechetan.vusikview' // Change this to match your package name
version = '1.1' // Change this to match your version number

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

bintray {
    user = 'dynamitechetan'
    key = '847aa69008163a43e35b78f3fb450c9f18a4948c'
    pkg {
        repo = 'maven'
        name = 'dynamitechetan.vusikview'

        version {
            name = '1.1'
            desc = 'A Android UI library for making music notes fall from top'
            released  = new Date()
            vcsTag = '1.1'
        }

        licenses = ['Apache-2.0']
        //vcs url

        vcsUrl = 'https://github.com/dynamitechetan/VusikView.git'
        websiteUrl = 'https://github.com/dynamitechetan'
    }
    configurations = ['archives']
}

artifacts {
    archives generateJavaDocsJar
    archives generateSourcesJar
}