Skip to content

Commit

Permalink
fix reactor#2274 remove gradle deprecation warnings
Browse files Browse the repository at this point in the history
- use newer configuration names

- use a newer version of dokka

- use latest gradle
  • Loading branch information
ericbottard committed Jul 30, 2020
1 parent f88a8b9 commit 2755965
Show file tree
Hide file tree
Showing 8 changed files with 89 additions and 85 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ buildscript {
plugins {
id 'org.asciidoctor.convert' version '1.5.11'
id "me.champeau.gradle.jmh" version "0.4.7" apply false
id "org.jetbrains.dokka" version "0.9.18" apply false
id "org.jetbrains.dokka" version "0.10.1" apply false
id "me.champeau.gradle.japicmp" version "0.2.6"
id "de.undercouch.download" version "3.4.3"
id "org.unbroken-dome.test-sets" version "3.0.0" apply false
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
29 changes: 12 additions & 17 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -154,19 +154,19 @@ if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
i=`expr $i + 1`
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi

Expand All @@ -175,14 +175,9 @@ save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
APP_ARGS=`save "$@"`

# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"

# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi

exec "$JAVACMD" "$@"
3 changes: 3 additions & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"

Expand Down
73 changes: 38 additions & 35 deletions reactor-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,42 +47,46 @@ testSets {

configurations {
compileOnly.extendsFrom jsr166backport
testCompile.extendsFrom jsr166backport
testCompileOnly.extendsFrom jsr166backport
}

dependencies {
// Reactive Streams
compile "org.reactivestreams:reactive-streams:${reactiveStreamsVersion}"
testCompile "org.reactivestreams:reactive-streams-tck:${reactiveStreamsVersion}"
api "org.reactivestreams:reactive-streams:${reactiveStreamsVersion}"
testImplementation "org.reactivestreams:reactive-streams-tck:${reactiveStreamsVersion}"

// JSR-305 annotations
optional "com.google.code.findbugs:jsr305:$jsr305Version"
compileOnly "com.google.code.findbugs:jsr305:$jsr305Version"
testCompileOnly "com.google.code.findbugs:jsr305:$jsr305Version"

//Optional Logging Operator
optional "org.slf4j:slf4j-api:$slf4jVersion"
compileOnly "org.slf4j:slf4j-api:$slf4jVersion"
testCompileOnly "org.slf4j:slf4j-api:$slf4jVersion"

//Optional Metrics
compileOnly "io.micrometer:micrometer-core:$micrometerVersion"

optional "org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}"
// Not putting kotlin-stdlib as implementation to not force it as a transitive lib
compileOnly "org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}"
testImplementation "org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}"

//Optional JDK 9 Converter
jsr166backport "io.projectreactor:jsr166:$jsr166BackportVersion"

testCompile "junit:junit:$jUnitVersion"
testImplementation "junit:junit:$jUnitVersion"

testRuntime "ch.qos.logback:logback-classic:$logbackVersion"
testRuntimeOnly "ch.qos.logback:logback-classic:$logbackVersion"
// Testing
testCompile(project(":reactor-test")) {
testImplementation(project(":reactor-test")) {
exclude module: 'reactor-core'
}

testCompile "org.assertj:assertj-core:$assertJVersion"
testCompile "org.testng:testng:$testNgVersion"
testCompile "org.mockito:mockito-core:$mockitoVersion"
testCompile "org.openjdk.jol:jol-core:$javaObjectLayoutVersion"
testCompile "pl.pragmatists:JUnitParams:$jUnitParamsVersion"
testCompile "org.awaitility:awaitility:$awaitilityVersion"
testImplementation "org.assertj:assertj-core:$assertJVersion"
testImplementation "org.testng:testng:$testNgVersion"
testImplementation "org.mockito:mockito-core:$mockitoVersion"
testImplementation "org.openjdk.jol:jol-core:$javaObjectLayoutVersion"
testImplementation "pl.pragmatists:JUnitParams:$jUnitParamsVersion"
testImplementation "org.awaitility:awaitility:$awaitilityVersion"

// withMicrometerTest is a test-set that validates what happens when micrometer *IS*
// on the classpath. Needs sourceSets.test.output because tests there use helpers like AutoDisposingRule etc.
Expand Down Expand Up @@ -153,31 +157,30 @@ dokka {
dependsOn jar
group = "documentation"
description = "Generates Kotlin API documentation."
moduleName = "reactor-core"
jdkVersion = 8

outputFormat = "html"
outputDirectory = new File(project.buildDir, "docs/kdoc")

//this is needed so that links to java classes are resolved
doFirst {
classpath += project.jar.outputs.files.getFiles()
classpath += project.sourceSets.main.compileClasspath
}
//this is needed so that the kdoc only generates for kotlin classes
//(default kotlinTasks sourceSet also includes java)
kotlinTasks {

disableAutoconfiguration = true

configuration {
moduleName = "reactor-core"
jdkVersion = 8
//this is needed so that links to java classes are resolved.
doFirst {
classpath += project.jar.outputs.files.getFiles()
classpath += project.sourceSets.main.compileClasspath
}
sourceRoot {
path = "src/main/kotlin"
}
externalDocumentationLink {
url = new URL("https://projectreactor.io/docs/core/release/api/")
}
externalDocumentationLink {
url = new URL("https://www.reactive-streams.org/reactive-streams-1.0.2-javadoc/")
}
}
processConfigurations = []
sourceDirs = files("src/main/kotlin")

externalDocumentationLink {
url = new URL("https://projectreactor.io/docs/core/release/api/")
}
externalDocumentationLink {
url = new URL("https://www.reactive-streams.org/reactive-streams-1.0.2-javadoc/")
}
}

task kdocZip(type: Zip, dependsOn: dokka) {
Expand Down
60 changes: 30 additions & 30 deletions reactor-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,18 @@ ext {
}

dependencies {
compile project(":reactor-core")
api project(":reactor-core")

optional "org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}"
// Not putting kotlin-stdlib as implementation to not force it as a transitive lib
compileOnly "org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}"
testImplementation "org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}"

testCompile "junit:junit:$jUnitVersion"
testImplementation "junit:junit:$jUnitVersion"

testRuntime "ch.qos.logback:logback-classic:$logbackVersion"
testRuntimeOnly "ch.qos.logback:logback-classic:$logbackVersion"

testCompile "org.assertj:assertj-core:$assertJVersion"
testCompile "org.mockito:mockito-core:$mockitoVersion"
testImplementation "org.assertj:assertj-core:$assertJVersion"
testImplementation "org.mockito:mockito-core:$mockitoVersion"
}

task downloadBaseline(type: Download) {
Expand Down Expand Up @@ -92,33 +94,31 @@ dokka {
dependsOn jar
group = "documentation"
description = "Generates Kotlin API documentation."
moduleName = "reactor-test"
jdkVersion = 8

outputFormat = "html"
outputDirectory = new File(project.buildDir, "docs/kdoc")

//this is needed so that links to java classes are resolved
doFirst {
classpath += project.jar.outputs.files.getFiles()
classpath += project.sourceSets.main.compileClasspath
}
//this is needed so that the kdoc only generates for kotlin classes
//(default kotlinTasks sourceSet also includes java)
kotlinTasks {

}
processConfigurations = []
sourceDirs = files("src/main/kotlin")

externalDocumentationLink {
url = new URL("https://projectreactor.io/docs/core/release/api/")
}
externalDocumentationLink {
url = new URL("https://projectreactor.io/docs/test/release/api/")
}
externalDocumentationLink {
url = new URL("https://www.reactive-streams.org/reactive-streams-1.0.2-javadoc/")
disableAutoconfiguration = true

configuration {
moduleName = "reactor-test"
jdkVersion = 8
//this is needed so that links to java classes are resolved.
doFirst {
classpath += project.jar.outputs.files.getFiles()
classpath += project.sourceSets.main.compileClasspath
}
sourceRoot {
path = "src/main/kotlin"
}
externalDocumentationLink {
url = new URL("https://projectreactor.io/docs/core/release/api/")
}
externalDocumentationLink {
url = new URL("https://projectreactor.io/docs/test/release/api/")
}
externalDocumentationLink {
url = new URL("https://www.reactive-streams.org/reactive-streams-1.0.2-javadoc/")
}
}
}

Expand Down
5 changes: 4 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@ plugins {
rootProject.name = 'reactor'


include 'reactor-core', 'reactor-test'
include 'reactor-core', 'reactor-test'

// See https://docs.gradle.org/6.5.1/release-notes.html. Drop once using Gradle 7.0+
enableFeaturePreview("VERSION_ORDERING_V2")

0 comments on commit 2755965

Please sign in to comment.