publish.gradle 702 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
apply plugin: 'maven'

def mavenRepositoryUrl = "http://nexus.yidianling.com/repository/AndroidReleases/"

def getVersionName() {
    return hasProperty('VERSION_NAME') ? VERSION_NAME : rootProject.ext.ydlPublishVersion[project.getName()]
}

uploadArchives {
    configuration = configurations.archives
    repositories.mavenDeployer {
            repository(url: mavenRepositoryUrl) {
                authentication(userName: "admin", password: "fjoi#1+#@")
            }
            pom.project {
                artifactId project.getName().replace('_', "-")
                groupId "com.ydl"
                version getVersionName()
                packaging 'aar' //填写aar
            }
    }
}