apply plugin: 'groovy'

repositories {
    jcenter()
}

dependencies {
    compile gradleApi()
    compile localGroovy()
    compile 'com.android.tools.build:gradle:1.3.0'
}


buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'


def siteUrl = 'https://github.com/GavinCT/MeituanCustomLintDemo'      // 项目的主页
def gitUrl = 'https://github.com/GavinCT/MeituanCustomLintDemo.git'   // Git仓库的url

task sourceJar(type: Jar) {
    from sourceSets.main.allSource
    classifier 'sources'
}
task docJar(type: Jar, dependsOn: javadoc) {
    from tasks.javadoc.destinationDir
    classifier 'doc'
}

group = 'com.czt.mtlint'
version = '1.0.2'

publishing {
    publications {
        MyPublication(MavenPublication) {
            from components.java
            groupId group
            artifactId 'plugin'
            version version
            artifact sourceJar
            artifact docJar
        }
    }
}

Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
bintray {
    user = properties.getProperty("bintray.user")
    key = properties.getProperty("bintray.apikey")
    publications = ['MyPublication']
    pkg {
        repo = "maven"
        name = "MeituanCustomLintDemoPlugin"	//发布到JCenter上的项目名字
        websiteUrl = siteUrl
        vcsUrl = gitUrl
        licenses = ["Apache-2.0"]
        publish = true
    }
}