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

Commit 2bd7d1a

Browse files
authored
Merge pull request #170 from reactor/reactor-rabbitmq-169-gradle-7-2
Bump Gradle to 7.2
2 parents e5f9fe9 + af8540b commit 2bd7d1a

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 {
@@ -54,7 +52,7 @@ ext {
5452
"https://rabbitmq.github.io/rabbitmq-java-client/api/current/",] as String[]
5553
}
5654

57-
apply from: "$gradleScriptDir/doc.gradle"
55+
apply from: "$gradleScriptDir/asciidoc.gradle"
5856
apply from: "$gradleScriptDir/releaser.gradle"
5957

6058
configurations.all {
@@ -70,7 +68,6 @@ configure(allprojects) { project ->
7068
maven { url 'https://repo.spring.io/snapshot' }
7169
}
7270

73-
apply plugin: 'maven'
7471
apply plugin: 'eclipse'
7572
apply plugin: 'idea'
7673
apply plugin: 'java'
@@ -99,21 +96,21 @@ configure(allprojects) { project ->
9996
]
10097

10198
dependencies {
102-
compile "io.projectreactor:reactor-core:$reactorCoreVersion"
103-
compile "com.rabbitmq:amqp-client:$rabbitMqJavaClientVersion"
99+
implementation "io.projectreactor:reactor-core:$reactorCoreVersion"
100+
implementation "com.rabbitmq:amqp-client:$rabbitMqJavaClientVersion"
104101

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

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

127125
jar {
128126
manifest {
@@ -145,27 +143,27 @@ project(':reactor-rabbitmq-samples') {
145143
description = 'Samples for Reactor RabbitMQ'
146144

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

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

157155
task sender(type:JavaExec) {
158-
main = 'reactor.rabbitmq.samples.SampleSender'
156+
mainClass = 'reactor.rabbitmq.samples.SampleSender'
159157
classpath = sourceSets.main.runtimeClasspath
160158
}
161159

162160
task receiver(type:JavaExec) {
163-
main = 'reactor.rabbitmq.samples.SampleReceiver'
161+
mainClass = 'reactor.rabbitmq.samples.SampleReceiver'
164162
classpath = sourceSets.main.runtimeClasspath
165163
}
166164

167165
task springboot(type:JavaExec) {
168-
main = 'reactor.rabbitmq.samples.SpringBootSample'
166+
mainClass = 'reactor.rabbitmq.samples.SpringBootSample'
169167
classpath = sourceSets.main.runtimeClasspath
170168
}
171169

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/asciidoc/pdf/index.pdf") {
73+
into ("docs/")
74+
rename("index.pdf", "reactor-rabbitmq-reference-guide-${rootProject.version}.pdf")
75+
}
76+
}
77+
from("$buildDir/asciidoc/html5/index.html") { into("docs/") }
78+
from("$buildDir/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)