apply plugin: 'groovy'
apply plugin: 'maven'

repositories {
    mavenCentral()
}

dependencies {
    compile gradleApi()
    compile localGroovy()
    compile 'org.ow2.asm:asm:5.2'
    compile 'com.android.tools.build:gradle:2.3.0'
}

group = "com.android.wkzf.plugin"
version = '0.0.6'

uploadArchives {
    repositories {
        mavenDeployer {
            repository(url: uri('../repo')){
                pom.artifactId = "gradle-plugin"
            }

        }

    }
}

//uploadArchives {
//    /**
//     *  请在根目录中添加local.properties文件，如果存在该文件，在该文件最后追加如下内容(包括用户名、密码、仓库地址)
//     * userName=admin
//     * password=*****
//     * url=http://10.0.18.175/nexus/content/repositories/android/
//     */
//    def url = "http://10.0.18.175/nexus/content/repositories/android/"
//    def userName = "admin"
//    def password = ""
//    File file = project.rootProject.file("local.properties")
//    if (file.exists()) {
//        Properties properties = new Properties()
//        properties.load(file.newDataInputStream())
//        url = properties.getProperty("url")
//        userName = properties.getProperty("userName")
//        password = properties.getProperty("password")
//    }
//
//    repositories.mavenDeployer {
//        repository(url: url) {
//            authentication(userName: userName, password: password)
//            pom.artifactId = "gradle-plugin"
//        }
//    }
//}