Skip to content
This repository was archived by the owner on Sep 26, 2025. It is now read-only.

Commit 058a69d

Browse files
committed
Merge #170 into 1.5.4
2 parents 2a057e6 + 328a278 commit 058a69d

File tree

9 files changed

+139
-117
lines changed

9 files changed

+139
-117
lines changed

build.gradle

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,12 @@ buildscript {
1919
mavenCentral()
2020
maven { url "https://repo.spring.io/plugins-release" }
2121
}
22-
dependencies {
23-
classpath 'org.asciidoctor:asciidoctorj-pdf:1.5.4'
24-
}
2522
}
2623
plugins {
27-
id 'org.asciidoctor.convert' version '1.5.12'
28-
id 'me.champeau.gradle.jmh' version '0.4.7'
29-
id "com.jfrog.artifactory" version "4.15.2" apply false
24+
id 'org.asciidoctor.jvm.convert' version '3.3.2' apply false
25+
id 'org.asciidoctor.jvm.pdf' version '3.3.2' apply false
26+
// applied in setup.gradle, only if artifactory credentials are configured
27+
id "com.jfrog.artifactory" version "4.24.20" apply false
3028
}
3129

3230
ext {
@@ -55,7 +53,7 @@ ext {
5553
"https://rabbitmq.github.io/rabbitmq-java-client/api/current/",] as String[]
5654
}
5755

58-
apply from: "$gradleScriptDir/doc.gradle"
56+
apply from: "$gradleScriptDir/asciidoc.gradle"
5957
apply from: "$gradleScriptDir/releaser.gradle"
6058

6159
configurations.all {
@@ -71,7 +69,6 @@ configure(allprojects) { project ->
7169
maven { url 'https://repo.spring.io/snapshot' }
7270
}
7371

74-
apply plugin: 'maven'
7572
apply plugin: 'eclipse'
7673
apply plugin: 'idea'
7774
apply plugin: 'java'
@@ -100,21 +97,21 @@ configure(allprojects) { project ->
10097
]
10198

10299
dependencies {
103-
compile "io.projectreactor:reactor-core:$reactorCoreVersion"
104-
compile "com.rabbitmq:amqp-client:$rabbitMqJavaClientVersion"
100+
implementation "io.projectreactor:reactor-core:$reactorCoreVersion"
101+
implementation "com.rabbitmq:amqp-client:$rabbitMqJavaClientVersion"
105102

106103
// Testing
107104
// JUnit Jupiter API and TestEngine implementation
108-
testCompile("org.junit.jupiter:junit-jupiter-api:${junitJupiterVersion}")
109-
testCompile("org.junit.jupiter:junit-jupiter-params:${junitJupiterVersion}")
110-
testRuntime("org.junit.jupiter:junit-jupiter-engine:${junitJupiterVersion}")
111-
112-
testCompile "io.projectreactor:reactor-test:$reactorCoreVersion"
113-
testCompile "org.mockito:mockito-core:$mockitoVersion"
114-
testCompile "org.assertj:assertj-core:${assertjVersion}"
115-
testRuntime "org.slf4j:jcl-over-slf4j:$slf4jVersion"
116-
testRuntime "org.slf4j:slf4j-api:$slf4jVersion"
117-
testRuntime "ch.qos.logback:logback-classic:$logbackVersion"
105+
testImplementation("org.junit.jupiter:junit-jupiter-api:${junitJupiterVersion}")
106+
testImplementation("org.junit.jupiter:junit-jupiter-params:${junitJupiterVersion}")
107+
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junitJupiterVersion}")
108+
109+
testImplementation "io.projectreactor:reactor-test:$reactorCoreVersion"
110+
testImplementation "org.mockito:mockito-core:$mockitoVersion"
111+
testImplementation "org.assertj:assertj-core:${assertjVersion}"
112+
testRuntimeOnly "org.slf4j:jcl-over-slf4j:$slf4jVersion"
113+
testRuntimeOnly "org.slf4j:slf4j-api:$slf4jVersion"
114+
testRuntimeOnly "ch.qos.logback:logback-classic:$logbackVersion"
118115
}
119116

120117
// force test runs even when there are no test changes
@@ -124,6 +121,7 @@ configure(allprojects) { project ->
124121
configure(rootProject) {
125122
archivesBaseName = 'reactor-rabbitmq'
126123
description = 'Reactor RabbitMQ: A reactive API for RabbitMQ'
124+
apply from: "$gradleScriptDir/javadoc.gradle"
127125

128126
jar {
129127
manifest {
@@ -146,27 +144,27 @@ project(':reactor-rabbitmq-samples') {
146144
description = 'Samples for Reactor RabbitMQ'
147145

148146
dependencies {
149-
compile rootProject
150-
runtime "ch.qos.logback:logback-classic:$logbackVersion"
147+
implementation rootProject
148+
runtimeOnly "ch.qos.logback:logback-classic:$logbackVersion"
151149
implementation "org.springframework.boot:spring-boot-starter:$springBootVersion"
152150
implementation "org.springframework.amqp:spring-rabbit:$springAmqpVersion"
153151

154-
testCompile rootProject.sourceSets.test.output
155-
testRuntime "org.springframework.boot:spring-boot-starter-test:$springBootVersion"
152+
testImplementation rootProject.sourceSets.test.output
153+
testRuntimeOnly "org.springframework.boot:spring-boot-starter-test:$springBootVersion"
156154
}
157155

158156
task sender(type:JavaExec) {
159-
main = 'reactor.rabbitmq.samples.SampleSender'
157+
mainClass = 'reactor.rabbitmq.samples.SampleSender'
160158
classpath = sourceSets.main.runtimeClasspath
161159
}
162160

163161
task receiver(type:JavaExec) {
164-
main = 'reactor.rabbitmq.samples.SampleReceiver'
162+
mainClass = 'reactor.rabbitmq.samples.SampleReceiver'
165163
classpath = sourceSets.main.runtimeClasspath
166164
}
167165

168166
task springboot(type:JavaExec) {
169-
main = 'reactor.rabbitmq.samples.SpringBootSample'
167+
mainClass = 'reactor.rabbitmq.samples.SpringBootSample'
170168
classpath = sourceSets.main.runtimeClasspath
171169
}
172170

gradle/asciidoc.gradle

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
/*
2+
* Copyright (c) 2011-2021 VMware Inc. or its affiliates, All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
configure(rootProject) {
18+
apply plugin: 'org.asciidoctor.jvm.convert'
19+
apply plugin: 'org.asciidoctor.jvm.pdf'
20+
21+
var date = new Date().format('yyyy-MM-dd');
22+
23+
// This configuration applies both to the asciidoctor & asciidoctorPdf tasks
24+
asciidoctorj {
25+
options = [doctype: 'book']
26+
attributes 'allow-uri-read': '',
27+
'attribute-missing': 'warn',
28+
'revdate': "${date}",
29+
'docinfo': '',
30+
'toc2': '',
31+
'compat-mode': '',
32+
'stylesdir': "stylesheets/",
33+
'stylesheet': 'golo.css',
34+
'appversion': "${project.version}",
35+
'source-highlighter': 'coderay'
36+
}
37+
38+
asciidoctor {
39+
sourceDir "src/docs/asciidoc/"
40+
sources {
41+
include "index.asciidoc"
42+
}
43+
baseDirFollowsSourceDir()
44+
resources {
45+
from(sourceDir) {
46+
include 'images/**'
47+
}
48+
}
49+
outputDir file("$buildDir/docs/asciidoc/html")
50+
logDocuments = true
51+
attributes stylesdir: "stylesheets/",
52+
stylesheet: 'golo.css',
53+
'source-highlighter': 'coderay'
54+
}
55+
56+
asciidoctorPdf {
57+
sourceDir "src/docs/asciidoc/"
58+
sources {
59+
include "index.asciidoc"
60+
}
61+
baseDirFollowsSourceDir()
62+
outputDir file("$buildDir/docs/asciidoc/pdf")
63+
logDocuments = true
64+
attributes 'source-highlighter': 'coderay'
65+
}
66+
67+
task docsZip(type: Zip, dependsOn: [asciidoctor, asciidoctorPdf]) {
68+
archiveBaseName.set('reactor-rabbitmq')
69+
archiveClassifier.set('docs')
70+
afterEvaluate() {
71+
//we copy the pdf late, when a potential customVersion has been applied to rootProject
72+
from("$buildDir/docs/asciidoc/pdf/index.pdf") {
73+
into ("docs/")
74+
rename("index.pdf", "reactor-rabbitmq-reference-guide-${rootProject.version}.pdf")
75+
}
76+
}
77+
from("$buildDir/docs/asciidoc/html5/index.html") { into("docs/") }
78+
from("$buildDir/docs/asciidoc/html5/images") { into("images/") }
79+
}
80+
}
81+

gradle/doc.gradle

Lines changed: 0 additions & 83 deletions
This file was deleted.

gradle/javadoc.gradle

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
javadoc {
2+
dependsOn jar
3+
group = "Reactor RabbitMQ Javadoc"
4+
5+
description = "Generates aggregated Javadoc API documentation."
6+
title = "Reactor RabbitMQ ${version}"
7+
8+
if (JavaVersion.current().isJava8Compatible()) {
9+
compileTestJava.options.compilerArgs += "-parameters"
10+
tasks.withType(Javadoc) {
11+
options.addStringOption('Xdoclint:none', '-quiet')
12+
}
13+
}
14+
15+
options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
16+
options.author = true
17+
options.header = "Reactor RabbitMQ"
18+
options.overview = "src/api/overview.html"
19+
options.stylesheetFile = file("src/api/stylesheet.css")
20+
options.links(rootProject.ext.javadocLinks)
21+
22+
maxMemory = "1024m"
23+
destinationDir = new File(buildDir, "docs/javadoc")
24+
source rootProject.sourceSets.main.allJava
25+
doFirst {
26+
classpath = files(rootProject.sourceSets.main.compileClasspath)
27+
}
28+
}

gradle/setup.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
import org.gradle.util.VersionNumber
17+
import org.gradle.util.internal.VersionNumber
1818

1919
static def qualifyVersion(String v) {
2020
def versionNumber = VersionNumber.parse(v)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

src/docs/asciidoc/getting-started.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ For Maven:
210210
</repositories>
211211
--------
212212

213-
[#versioning]
213+
[[versioning-scheme]]
214214
==== Versioning
215215

216216
Reactor RabbitMQ used https://semver.org/[semantic versioning] from version 1.0 to

src/docs/asciidoc/index.asciidoc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
= Reactor RabbitMQ Reference Guide
2-
Arnaud Cogoluègnes, Pawel Mackowski
3-
// version is automatically set in doc.gradle, no need to change it here
4-
:appversion: 1.0.0.BUILD-SNAPSHOT
2+
Arnaud Cogoluègnes; Pawel Mackowski
53
ifndef::host-github[:ext-relative: {outfilesuffix}]
64
{appversion}
75
:doctype: book

src/docs/asciidoc/new.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
=== What's new in Reactor RabbitMQ 1.4.1
66

77
* Support exchange-to-exchange binding and unbinding
8-
* Change in <<versioning,versioning scheme>>: Reactor RabbitMQ does not follow semantic versioning anymore,
8+
* Change in <<versioning-scheme,versioning scheme>>: Reactor RabbitMQ does not follow semantic versioning anymore,
99
it uses now a `GENERATION.MAJOR.MINOR` scheme, for consistency with the other Reactor libraries
1010

1111
=== What's new in Reactor RabbitMQ 1.4

0 commit comments

Comments
 (0)