|
1 |
| -apply plugin: 'signing' |
2 |
| -apply plugin: 'com.jfrog.bintray' |
3 |
| -apply plugin: 'com.github.dcendents.android-maven' |
| 1 | +apply plugin: 'maven-publish' |
| 2 | +apply plugin: "io.spring.bintray" |
4 | 3 |
|
5 |
| -group = 'com.nhaarman' |
6 |
| -version = rootProject.ext.versionName |
| 4 | +bintray { |
| 5 | + bintrayUser = hasProperty('bintray_username') ? bintray_username : System.getenv('BINTRAY_USER') |
| 6 | + bintrayKey = hasProperty('bintray_key') ? bintray_key : System.getenv('BINTRAY_KEY') |
| 7 | + repo = 'maven' |
| 8 | + org = hasProperty('bintray_username') ? bintray_username : System.getenv('BINTRAY_USER') |
| 9 | + packageName = 'Mockito-Kotlin' |
| 10 | + publication = 'mavenJava' |
| 11 | + |
| 12 | + licenses = ['MIT'] |
| 13 | + ossrhUser = hasProperty('sonatype_username') ? sonatype_username : System.getenv('SONATYPE_USERNAME') |
| 14 | + ossrhPassword = hasProperty('sonatype_password') ? sonatype_password : System.getenv('SONATYPE_PASSWORD') |
| 15 | + overrideOnUpload = false |
| 16 | +} |
| 17 | +bintray.gpgPassphrase = hasProperty('signing_password') ? signing_password : System.getenv('SIGNING_PASSWORD') |
7 | 18 |
|
8 | 19 | task javadocJar(type: Jar, dependsOn: javadoc) {
|
9 | 20 | classifier = 'javadoc'
|
10 | 21 | from 'build/javadoc'
|
11 | 22 | }
|
12 | 23 |
|
13 |
| -task sourcesJar(type: Jar) { |
| 24 | +task sourceJar(type: Jar) { |
14 | 25 | from sourceSets.main.allSource
|
15 |
| - classifier = 'sources' |
16 |
| -} |
17 |
| - |
18 |
| -artifacts { |
19 |
| - archives jar |
20 |
| - |
21 |
| - archives javadocJar |
22 |
| - archives sourcesJar |
23 |
| -} |
24 |
| - |
25 |
| -signing { |
26 |
| - sign configurations.archives |
27 |
| -} |
28 |
| - |
29 |
| -install { |
30 |
| - repositories.mavenInstaller { |
31 |
| - pom { |
32 |
| - project { |
33 |
| - name 'Mockito-Kotlin' |
34 |
| - packaging 'jar' |
35 |
| - description 'Using Mockito with Kotlin.' |
36 |
| - url 'https://github.com/nhaarman/mockito-kotlin' |
37 |
| - |
38 |
| - scm { |
39 |
| - url 'scm:git@github.com:nhaarman/mockito-kotlin.git' |
40 |
| - connection 'scm:git@github.com:nhaarman/mockito-kotlin.git' |
41 |
| - developerConnection 'scm:git@github.com:nhaarman/mockito-kotlin.git' |
42 |
| - } |
43 |
| - |
44 |
| - licenses { |
45 |
| - license { |
46 |
| - name 'MIT' |
47 |
| - url 'https://opensource.org/licenses/MIT' |
48 |
| - distribution 'repo' |
49 |
| - } |
50 |
| - } |
51 |
| - |
52 |
| - developers { |
53 |
| - developer { |
54 |
| - id 'nhaarman' |
55 |
| - name 'Niek Haarman' |
56 |
| - } |
57 |
| - } |
58 |
| - } |
59 |
| - } |
60 |
| - } |
61 | 26 | }
|
62 | 27 |
|
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' |
| 28 | +group = 'com.nhaarman' |
| 29 | +version = rootProject.ext.versionName |
76 | 30 |
|
77 |
| - version { |
78 |
| - name = versionName |
| 31 | +publishing { |
| 32 | + publications { |
| 33 | + mavenJava(MavenPublication) { |
| 34 | + groupId 'com.nhaarman' |
| 35 | + artifactId 'mockito-kotlin' |
79 | 36 |
|
80 |
| - gpg { |
81 |
| - sign = true |
82 |
| - } |
| 37 | + from components.java |
83 | 38 |
|
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' |
| 39 | + artifact sourceJar { |
| 40 | + classifier "sources" |
89 | 41 | }
|
90 | 42 | }
|
91 | 43 | }
|
|
0 commit comments