aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzczepan Faber <s.faber@airbnb.com>2021-01-24 19:24:07 -0600
committerSzczepan Faber <s.faber@airbnb.com>2021-01-24 19:24:07 -0600
commit5624a10e2853d85b0ae10019819c5afefeedb4cf (patch)
treecd6e6efac716d4c28edfea9ae3f79809ac99e2d4
parent50f284af6bbdc5e7d6f07f477dc88580c0b7ee6b (diff)
downloadmockito-kotlin-5624a10e2853d85b0ae10019819c5afefeedb4cf.tar.gz
Enabled Bintray publications
Tested by: - building artifacts locally and recursively comparing with the previously released artifacts/poms - published to 'test' repo on Bintray
-rw-r--r--build.gradle3
-rw-r--r--gradle/publishing.gradle58
-rw-r--r--version.properties2
3 files changed, 47 insertions, 16 deletions
diff --git a/build.gradle b/build.gradle
index 9de5a17..3a07a83 100644
--- a/build.gradle
+++ b/build.gradle
@@ -4,9 +4,6 @@ plugins {
id "org.shipkit.shipkit-github-release" version "1.1.1"
}
-//TODO: update the group to 'org.mockito'
-group = 'com.nhaarman.mockito-kotlin2'
-
tasks.named("generateChangelog") {
previousRevision = project.ext.'shipkit-auto-version.previous-tag'
githubToken = System.getenv("GITHUB_TOKEN")
diff --git a/gradle/publishing.gradle b/gradle/publishing.gradle
index 716da43..00194a6 100644
--- a/gradle/publishing.gradle
+++ b/gradle/publishing.gradle
@@ -1,17 +1,7 @@
apply plugin: 'maven-publish'
-//bintray.bintrayUser = hasProperty('bintray_username') ? bintray_username : System.getenv('BINTRAY_USER')
-//bintray.bintrayKey = hasProperty('bintray_key') ? bintray_key : System.getenv('BINTRAY_KEY')
-//bintray.repo = 'maven'
-//bintray.org = hasProperty('bintray_username') ? bintray_username : System.getenv('BINTRAY_USER')
-//bintray.packageName = 'Mockito-Kotlin'
-//bintray.publication = 'mavenJava'
-//
-//bintray.licenses = ['MIT']
-//bintray.ossrhUser = hasProperty('sonatype_username') ? sonatype_username : System.getenv('SONATYPE_USERNAME')
-//bintray.ossrhPassword = hasProperty('sonatype_password') ? sonatype_password : System.getenv('SONATYPE_PASSWORD')
-//bintray.overrideOnUpload = false
-//bintray.gpgPassphrase = hasProperty('signing_password') ? signing_password : System.getenv('SIGNING_PASSWORD')
+//TODO: update the group to 'org.mockito' ***AND*** change java packages
+group = 'com.nhaarman.mockitokotlin2'
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
@@ -60,8 +50,52 @@ publishing {
repositories { maven { url = "$rootProject.buildDir/repo" } }
}
+clean {
+ delete "$rootProject.buildDir/repo"
+}
+
// Avoid generation of the module metadata so that we don't have to publish an additional file
// and keep the build logic simple.
tasks.withType(GenerateModuleMetadata) {
enabled = false
+}
+
+//fleshes out problems with Maven pom generation when building
+tasks.build.dependsOn('publishJavaLibraryPublicationToMavenLocal')
+
+//Bintray Gradle plugin configuration (https://github.com/bintray/gradle-bintray-plugin)
+//Plugin jars are added to the buildscript classpath in the root build.gradle file
+apply plugin: 'com.jfrog.bintray'
+
+bintray {
+ //We need to use some user id here, because the Bintray key is associated with the user
+ //However, any user id is good, so longer the user has necessary privileges to the repository
+ user = 'szczepiq' //https://bintray.com/szczepiq
+ key = System.getenv('BINTRAY_API_KEY')
+ publish = false //can be changed to 'false' for testing
+ dryRun = project.hasProperty('bintrayDryRun')
+
+ publications = ['mavenJava']
+
+ pkg {
+ repo = 'test' //https://bintray.com/mockito/maven // TODO change to 'maaven' when CI ready
+ userOrg = 'mockito' //https://bintray.com/mockito
+
+ name = 'mockito-kotlin'
+
+ licenses = ['MIT']
+ labels = ['kotlin', 'mockito']
+ vcsUrl = 'https://github.com/mockito/mockito-kotlin.git'
+
+ version {
+ name = project.version
+ vcsTag = "v$project.version"
+
+ mavenCentralSync {
+ sync = false // TODO enable after CI+bintray integration is ready
+ user = System.getenv('NEXUS_TOKEN_USER')
+ password = System.getenv('NEXUS_TOKEN_PWD')
+ }
+ }
+ }
} \ No newline at end of file
diff --git a/version.properties b/version.properties
index d3be764..8285f56 100644
--- a/version.properties
+++ b/version.properties
@@ -1,3 +1,3 @@
# Version of the produced binaries.
# The version is inferred by shipkit-auto-version Gradle plugin (https://github.com/shipkit/shipkit-auto-version)
-version=2.2.1-SNAPSHOT
+version=2.3.0