1- apply plugin : ' maven'
21apply plugin : ' signing'
2+ apply plugin : ' com.jfrog.bintray'
3+ apply plugin : ' com.github.dcendents.android-maven'
34
45group = ' com.nhaarman'
56version = rootProject. ext. versionName
6- def sonatypeUsername = hasProperty(' sonatype_username' ) ? sonatype_username : System . getenv(' SONATYPE_USERNAME' )
7- def sonatypePassword = hasProperty(' sonatype_password' ) ? sonatype_password : System . getenv(' SONATYPE_PASSWORD' )
8-
97
108task javadocJar (type : Jar , dependsOn : javadoc) {
119 classifier = ' javadoc'
@@ -28,19 +26,10 @@ signing {
2826 sign configurations. archives
2927}
3028
31- uploadArchives {
32- repositories {
33- mavenDeployer {
34- beforeDeployment { MavenDeployment deployment -> signing. signPom(deployment) }
35-
36- repository(url : " https://oss.sonatype.org/service/local/staging/deploy/maven2" ) {
37- authentication(
38- userName : sonatypeUsername,
39- password : sonatypePassword
40- )
41- }
42-
43- pom. project {
29+ install {
30+ repositories. mavenInstaller {
31+ pom {
32+ project {
4433 name ' Mockito-Kotlin'
4534 packaging ' jar'
4635 description ' Using Mockito with Kotlin.'
@@ -55,6 +44,7 @@ uploadArchives {
5544 licenses {
5645 license {
5746 name ' MIT'
47+ url ' https://opensource.org/licenses/MIT'
5848 distribution ' repo'
5949 }
6050 }
@@ -68,4 +58,35 @@ uploadArchives {
6858 }
6959 }
7060 }
61+ }
62+
63+ bintray {
64+ user = hasProperty(' bintray_username' ) ? bintray_username : System . getenv(' BINTRAY_USER' )
65+ key = hasProperty(' bintray_key' ) ? bintray_key : System . getenv(' BINTRAY_KEY' )
66+
67+ configurations = [' archives' ]
68+
69+ publish = true
70+
71+ pkg {
72+ repo = ' maven'
73+ name = ' Mockito-Kotlin'
74+ licenses = [' MIT' ]
75+ vcsUrl = ' https://github.com/nhaarman/mockito-kotlin.git'
76+
77+ version {
78+ name = versionName
79+
80+ gpg {
81+ sign = true
82+ }
83+
84+ mavenCentralSync {
85+ sync = true
86+ user = hasProperty(' sonatype_username' ) ? sonatype_username : System . getenv(' SONATYPE_USERNAME' )
87+ password = hasProperty(' sonatype_password' ) ? sonatype_password : System . getenv(' SONATYPE_PASSWORD' )
88+ close = ' 1'
89+ }
90+ }
91+ }
7192}
0 commit comments