apply plugin: 'com.android.library'

repositories {
    mavenCentral()
}

dependencies {
    compile 'com.android.support:appcompat-v7:22.2.0'
}

android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"

    defaultConfig {
        minSdkVersion 7
        targetSdkVersion 22
        versionCode 1
        versionName "1.0.0"
    }
}

/*
def siteUrl = 'https://github.com/ikew0ng/SwipeBackLayout'
def gitUrl = 'https://github.com/ikew0ng/SwipeBackLayout.git'
group = "me.imid.swipebacklayout.lib"

install {
    repositories.mavenInstaller {
        pom {
            project {
                packaging 'aar'
                // Add your description here
                name 'An Android library that help you to build app with swipe back gesture.'
                url siteUrl
                licenses {
                    license {
                        name 'The Apache Software License, Version 2.0'
                        url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
                    }
                }
                developers {
                    developer {
                        id 'ike'
                        name 'ike'
                        email 'ike@imid.me'
                    }
                }
                scm {
                    connection gitUrl
                    developerConnection gitUrl
                    url siteUrl
                }
            }
        }
    }
}
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))
}
task javadocJar(type: Jar, dependsOn: javadoc) {
    classifier = 'javadoc'
    from javadoc.destinationDir
}
artifacts {
    archives javadocJar
    archives sourcesJar
}
Properties properties = new Properties()
File gradle_properties = project.file('gradle.properties');
if (gradle_properties.exists()) {
    properties.load(project.file('gradle.properties').newDataInputStream())
}
bintray {
    user = properties.getProperty("bintray.user")
    key = properties.getProperty("bintray.apikey")
    configurations = ['archives']
    pkg {
        repo = "maven"
        name = "SwipeBackLayout"
        websiteUrl = siteUrl
        vcsUrl = gitUrl
        licenses = ["Apache-2.0"]
        publish = true
    }
}*/