11apply plugin : ' maven-publish'
22
3- // TODO: update the group to 'org.mockito' ***AND*** change java packages
4- group = ' com.nhaarman.mockitokotlin2'
5-
63task javadocJar (type : Jar , dependsOn : javadoc) {
74 classifier = ' javadoc'
85 from ' build/javadoc'
@@ -63,39 +60,10 @@ tasks.withType(GenerateModuleMetadata) {
6360// fleshes out problems with Maven pom generation when building
6461tasks. build. dependsOn(' publishJavaLibraryPublicationToMavenLocal' )
6562
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 = [' javaLibrary' ]
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- }
63+ apply plugin : ' signing' // https://docs.gradle.org/current/userguide/signing_plugin.html
64+ signing {
65+ if (System . getenv(" PGP_KEY" )) {
66+ useInMemoryPgpKeys(System . getenv(" PGP_KEY" ), System . getenv(" PGP_PWD" ))
67+ sign publishing. publications. javaLibrary
10068 }
10169}
0 commit comments