1
1
buildscript {
2
2
repositories {
3
3
mavenCentral()
4
- jcenter()
5
4
}
6
-
7
5
dependencies {
8
6
classpath ' com.google.protobuf:protobuf-gradle-plugin:0.8.15'
9
7
classpath ' com.avast.gradle:gradle-docker-compose-plugin:0.14.1'
10
8
classpath ' com.github.ben-manes:gradle-versions-plugin:0.36.0'
11
- classpath ' com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5'
12
9
}
13
10
}
14
11
15
- apply plugin : ' idea'
12
+ plugins {
13
+ id " io.github.gradle-nexus.publish-plugin" version ' 1.0.0'
14
+ }
16
15
apply plugin : ' docker-compose'
17
16
18
- group = " com.avast.clients.rabbitmq"
19
- version = version == ' unspecified' ? ' DEVELOPER-SNAPSHOT' : version
17
+ nexusPublishing {
18
+ repositories {
19
+ sonatype()
20
+ }
21
+ }
20
22
21
23
allprojects {
24
+ apply plugin : ' idea'
25
+ group = ' com.avast.clients.rabbitmq'
26
+ version = version == ' unspecified' ? ' DEVELOPER-SNAPSHOT' : version
22
27
ext {
23
28
def scalaVersionEnv = System . getenv(" SCALA_VERSION" )
24
29
@@ -44,11 +49,10 @@ println("Scala version: ${scalaVersion} (${scalaVersionFull})") // will display
44
49
subprojects {
45
50
apply plugin : ' java'
46
51
apply plugin : ' scala'
47
- apply plugin : ' com.github.ben-manes.versions'
48
- apply plugin : ' com.jfrog.bintray'
49
- apply plugin : ' maven'
52
+ apply plugin : ' java-library'
50
53
apply plugin : ' maven-publish'
51
- apply plugin : ' idea'
54
+ apply plugin : ' signing'
55
+ apply plugin : ' com.github.ben-manes.versions'
52
56
53
57
task sourceJar(type : Jar ) {
54
58
from sourceSets. main. allSource
@@ -57,43 +61,50 @@ subprojects {
57
61
58
62
group = " com.avast.clients.rabbitmq"
59
63
60
- publishing {
61
- publications {
62
- MyPublication (MavenPublication ) {
63
- from components. java
64
- groupId project. group
65
- version project. version
66
- artifact sourceJar
64
+ java {
65
+ withJavadocJar()
66
+ withSourcesJar()
67
+ }
68
+
69
+ afterEvaluate {
70
+ publishing {
71
+ publications {
72
+ mavenJava(MavenPublication ) {
73
+ from(components. java)
74
+ artifactId = archivesBaseName
75
+ pom {
76
+ name = ' RabbitMQ client for Scala'
77
+ description = ' Scala wrapper over standard RabbitMQ Java client library'
78
+ url = ' https://github.com/avast/rabbitmq-scala-client'
79
+ licenses {
80
+ license {
81
+ name = ' The MIT License'
82
+ url = ' http://www.opensource.org/licenses/mit-license.php'
83
+ }
84
+ }
85
+ developers {
86
+ developer {
87
+ id = ' jendakol'
88
+ name = ' Jenda Kolena'
89
+
90
+ }
91
+ }
92
+ scm {
93
+ connection = ' scm:git:git://github.com/avast/rabbitmq-scala-client.git'
94
+ developerConnection = ' scm:git:ssh://github.com/avast/rabbitmq-scala-client.git'
95
+ url = ' https://github.com/avast/rabbitmq-scala-client'
96
+ }
97
+ }
98
+ }
67
99
}
68
100
}
69
101
}
70
102
71
- artifacts {
72
- archives jar
73
- archives sourceJar
74
- }
75
-
76
- bintray {
77
- user = System . getenv(' BINTRAY_USER' )
78
- key = System . getenv(' BINTRAY_KEY' )
79
- publish = true // auto publish
80
- configurations = [' archives' ]
81
-
82
- pkg {
83
- repo = ' maven'
84
- name = ' rabbitmq-scala-client'
85
- userOrg = ' avast'
86
- desc = ' Scala wrapper over standard RabbitMQ Java client library'
87
- licenses = [' Apache-2.0' ]
88
- vcsUrl = ' https://github.com/avast/rabbitmq-scala-client.git'
89
- githubRepo = ' avast/rabbitmq-scala-client'
90
- websiteUrl = ' https://github.com/avast/rabbitmq-scala-client'
91
- issueTrackerUrl = ' https://github.com/avast/rabbitmq-scala-client/issues'
92
- labels = [' rabbitmq' , ' client' , ' amqp' , ' scala' ]
93
- version {
94
- name = project. version
95
- vcsTag = project. version
96
- }
103
+ signing {
104
+ String base64Key = System . getenv(' SIGNING_KEY' )
105
+ if (base64Key) {
106
+ useInMemoryPgpKeys(new String (Base64 . decoder. decode(base64Key)), System . getenv(' SIGNING_PASSWORD' ))
107
+ sign publishing. publications
97
108
}
98
109
}
99
110
0 commit comments