apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
//A TabLayout that supports prompt information Library for Android
// 这个version是区分library版本的，因此当我们需要更新library时记得修改这个version
//version = "1.6.8"
version = "1.11"
def siteUrl = 'https://github.com/ZuYun/JPagerSlidingTabStrip'      // 项目的主页
def gitUrl = 'https://github.com/ZuYun/JPagerSlidingTabStrip.git'   // Git仓库的url
group = "com.yun.ospl"   // Maven Group ID for the artifact，一般填你唯一的包名
install {
    repositories.mavenInstaller {
        //This generates POM.xml with proper parameters
        pom {
            project {
                packaging 'aar'
                //添加项目描述
                name 'A TabLayout for Android'
                url siteUrl
                //Set your license
                licenses {
                    license {
                        name 'The Apache Software License, Version 2.0'
                        url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
                    }
                }
                developers {
                    developer {
                        id 'jonas-j'        //填写的一些基本信息
                        name 'jonas-j'
                        email 'jonas-j@outlook.com'
                    }
                }
                scm {
                    connection gitUrl
                    developerConnection gitUrl
                    url siteUrl
                }
            }
        }
    }
}
//task sourcesJar(type: Jar) {
//    from android.sourceSets.main.java.srcDirs
//    classifier = 'sources'
//}
//artifacts {
//    archives sourcesJar
//}
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
bintray {
    user = properties.getProperty("bintray.user")
    key = properties.getProperty("bintray.apikey")
    configurations = ['archives']
    pkg {
        repo = "maven"
        name = "JTabStrip"    //发布到JCenter上的项目名字
        websiteUrl = siteUrl
        vcsUrl = gitUrl
        licenses = ["Apache-2.0"]
        publish = true
    }
}

//gradlew bintrayUpload
