1
- apply plugin : ' maven'
2
1
apply plugin : ' signing'
2
+ apply plugin : ' com.jfrog.bintray'
3
+ apply plugin : ' com.github.dcendents.android-maven'
3
4
4
5
group = ' com.nhaarman'
5
6
version = 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
-
9
7
10
8
task javadocJar (type : Jar , dependsOn : javadoc) {
11
9
classifier = ' javadoc'
@@ -28,19 +26,10 @@ signing {
28
26
sign configurations. archives
29
27
}
30
28
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 {
44
33
name ' Mockito-Kotlin'
45
34
packaging ' jar'
46
35
description ' Using Mockito with Kotlin.'
@@ -55,6 +44,7 @@ uploadArchives {
55
44
licenses {
56
45
license {
57
46
name ' MIT'
47
+ url ' https://opensource.org/licenses/MIT'
58
48
distribution ' repo'
59
49
}
60
50
}
@@ -68,4 +58,35 @@ uploadArchives {
68
58
}
69
59
}
70
60
}
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
+ }
71
92
}
0 commit comments