apply plugin: 'maven-publish' publishing { publications { maven(MavenPublication) { groupId = MAVEN_GROUNP_ID artifactId = 'base-rx-mvc' version = '1.1.3' } } repositories { maven { name = 'nexus' allowInsecureProtocol true url MAVEN_PUBLIC_URL credentials { username = MAVEN_USERNAME password = MAVEN_PASSWORD } def releasesRepoUrl = MAVEN_PUBLIC_URL def snapshotRepoUrl = MAVEN_SNAPSHOTS_URL url = version.endsWith('SNAPSHOT') ? snapshotRepoUrl : releasesRepoUrl } } } //uploadArchives { // repositories { // mavenDeployer{ // repository(url:MAVEN_PUBLIC_URL){ // authentication(userName: MAVEN_USERNAME, password: MAVEN_PASSWORD) // } // pom.groupId = MAVEN_GROUNP_ID // pom.artifactId = 'base-rx-mvc' // pom.version = '1.1.3' // pom.packaging = 'aar' // } // } //}