1
1
apply plugin : ' maven-publish'
2
2
3
- // bintray.bintrayUser = hasProperty('bintray_username') ? bintray_username : System.getenv('BINTRAY_USER')
4
- // bintray.bintrayKey = hasProperty('bintray_key') ? bintray_key : System.getenv('BINTRAY_KEY')
5
- // bintray.repo = 'maven'
6
- // bintray.org = hasProperty('bintray_username') ? bintray_username : System.getenv('BINTRAY_USER')
7
- // bintray.packageName = 'Mockito-Kotlin'
8
- // bintray.publication = 'mavenJava'
9
- //
10
- // bintray.licenses = ['MIT']
11
- // bintray.ossrhUser = hasProperty('sonatype_username') ? sonatype_username : System.getenv('SONATYPE_USERNAME')
12
- // bintray.ossrhPassword = hasProperty('sonatype_password') ? sonatype_password : System.getenv('SONATYPE_PASSWORD')
13
- // bintray.overrideOnUpload = false
14
- // bintray.gpgPassphrase = hasProperty('signing_password') ? signing_password : System.getenv('SIGNING_PASSWORD')
3
+ // TODO: update the group to 'org.mockito' ***AND*** change java packages
4
+ group = ' com.nhaarman.mockitokotlin2'
15
5
16
6
task javadocJar (type : Jar , dependsOn : javadoc) {
17
7
classifier = ' javadoc'
@@ -60,8 +50,52 @@ publishing {
60
50
repositories { maven { url = " $rootProject . buildDir /repo" } }
61
51
}
62
52
53
+ clean {
54
+ delete " $rootProject . buildDir /repo"
55
+ }
56
+
63
57
// Avoid generation of the module metadata so that we don't have to publish an additional file
64
58
// and keep the build logic simple.
65
59
tasks. withType(GenerateModuleMetadata ) {
66
60
enabled = false
61
+ }
62
+
63
+ // fleshes out problems with Maven pom generation when building
64
+ tasks. build. dependsOn(' publishJavaLibraryPublicationToMavenLocal' )
65
+
66
+ // Bintray Gradle plugin configuration (https://github.com/bintray/gradle-bintray-plugin)
67
+ // Plugin jars are added to the buildscript classpath in the root build.gradle file
68
+ apply plugin : ' com.jfrog.bintray'
69
+
70
+ bintray {
71
+ // We need to use some user id here, because the Bintray key is associated with the user
72
+ // However, any user id is good, so longer the user has necessary privileges to the repository
73
+ user = ' szczepiq' // https://bintray.com/szczepiq
74
+ key = System . getenv(' BINTRAY_API_KEY' )
75
+ publish = false // can be changed to 'false' for testing
76
+ dryRun = project. hasProperty(' bintrayDryRun' )
77
+
78
+ publications = [' mavenJava' ]
79
+
80
+ pkg {
81
+ repo = ' test' // https://bintray.com/mockito/maven // TODO change to 'maaven' when CI ready
82
+ userOrg = ' mockito' // https://bintray.com/mockito
83
+
84
+ name = ' mockito-kotlin'
85
+
86
+ licenses = [' MIT' ]
87
+ labels = [' kotlin' , ' mockito' ]
88
+ vcsUrl = ' https://github.com/mockito/mockito-kotlin.git'
89
+
90
+ version {
91
+ name = project. version
92
+ vcsTag = " v$project . version "
93
+
94
+ mavenCentralSync {
95
+ sync = false // TODO enable after CI+bintray integration is ready
96
+ user = System . getenv(' NEXUS_TOKEN_USER' )
97
+ password = System . getenv(' NEXUS_TOKEN_PWD' )
98
+ }
99
+ }
100
+ }
67
101
}
0 commit comments