aboutsummaryrefslogtreecommitdiff
path: root/gradle/publishing.gradle
diff options
context:
space:
mode:
Diffstat (limited to 'gradle/publishing.gradle')
-rw-r--r--gradle/publishing.gradle42
1 files changed, 5 insertions, 37 deletions
diff --git a/gradle/publishing.gradle b/gradle/publishing.gradle
index 722f59a..6bb5f1a 100644
--- a/gradle/publishing.gradle
+++ b/gradle/publishing.gradle
@@ -1,8 +1,5 @@
apply plugin: 'maven-publish'
-//TODO: update the group to 'org.mockito' ***AND*** change java packages
-group = 'com.nhaarman.mockitokotlin2'
-
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from 'build/javadoc'
@@ -63,39 +60,10 @@ tasks.withType(GenerateModuleMetadata) {
//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 = ['javaLibrary']
-
- 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')
- }
- }
+apply plugin: 'signing' //https://docs.gradle.org/current/userguide/signing_plugin.html
+signing {
+ if (System.getenv("PGP_KEY")) {
+ useInMemoryPgpKeys(System.getenv("PGP_KEY"), System.getenv("PGP_PWD"))
+ sign publishing.publications.javaLibrary
}
} \ No newline at end of file