Skip to content

Commit 138c473

Browse files
committed
Moving the FlowAdapters into the core jar as a solution to reactive-streams#424
1 parent 582fdae commit 138c473

File tree

11 files changed

+21
-28
lines changed

11 files changed

+21
-28
lines changed

api/build.gradle

+18
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
11
description = "reactive-streams"
2+
def jdkFlow = false
3+
try {
4+
Class.forName("java.util.concurrent.Flow")
5+
jdkFlow = true
6+
} catch (ClassNotFoundException cnfe) {
7+
8+
}
9+
10+
sourceSets {
11+
main {
12+
java {
13+
if (jdkFlow)
14+
srcDirs = ['src/main/java', 'src/main/java9']
15+
else
16+
srcDirs = ['src/main/java']
17+
}
18+
}
19+
}
220

321
jar {
422
manifest {

build.gradle

+1-2
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ subprojects {
4949
if (name in ["reactive-streams",
5050
"reactive-streams-tck",
5151
"reactive-streams-tck-flow",
52-
"reactive-streams-examples",
53-
"reactive-streams-flow-adapters"]) {
52+
"reactive-streams-examples"]) {
5453
apply plugin: "maven"
5554
apply plugin: "signing"
5655

flow-adapters/.gitignore

-1
This file was deleted.

flow-adapters/build.gradle

-20
This file was deleted.

settings.gradle

+2-4
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ try {
1111
Class.forName("java.util.concurrent.Flow")
1212
jdkFlow = true
1313
println(ANSI_GREEN + " INFO: ------------------ JDK9 classes detected ---------------------------------" + ANSI_RESET)
14-
println(ANSI_GREEN + " INFO: Java 9 Flow API found; Including [flow-adapters, tck-flow] in build. " + ANSI_RESET)
14+
println(ANSI_GREEN + " INFO: Java 9 Flow API found; Including [tck-flow] & FlowAdapters in build. " + ANSI_RESET)
1515
println(ANSI_GREEN + " INFO: --------------------------------------------------------------------------" + ANSI_RESET)
1616
} catch (Throwable ex) {
1717
// Flow API not available
1818
println(ANSI_RED + "WARNING: -------------------- JDK9 classes NOT detected -----------------------------" + ANSI_RESET)
19-
println(ANSI_RED + "WARNING: Java 9 Flow API not found; Not including [flow-adapters, tck-flow] in build." + ANSI_RESET)
19+
println(ANSI_RED + "WARNING: Java 9 Flow API not found; Not including [tck-flow] & FlowAdapters in build." + ANSI_RESET)
2020
println(ANSI_RED + "WARNING: In order to execute the complete test-suite run the build using JDK9+. " + ANSI_RESET)
2121
println(ANSI_RED + "WARNING: ----------------------------------------------------------------------------" + ANSI_RESET)
2222
}
@@ -26,14 +26,12 @@ include ':reactive-streams-tck'
2626
include ':reactive-streams-examples'
2727

2828
if (jdkFlow) {
29-
include ':reactive-streams-flow-adapters'
3029
include ':reactive-streams-tck-flow'
3130
}
3231

3332
project(':reactive-streams').projectDir = "$rootDir/api" as File
3433
project(':reactive-streams-tck').projectDir = "$rootDir/tck" as File
3534
project(':reactive-streams-examples').projectDir = "$rootDir/examples" as File
3635
if (jdkFlow) {
37-
project(':reactive-streams-flow-adapters').projectDir = "$rootDir/flow-adapters" as File
3836
project(':reactive-streams-tck-flow').projectDir = "$rootDir/tck-flow" as File
3937
}

tck-flow/build.gradle

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ description = 'reactive-streams-tck-flow'
22
dependencies {
33
compile group: 'org.testng', name: 'testng', version:'5.14.10'
44
compile project(':reactive-streams-tck')
5-
compile project(':reactive-streams-flow-adapters')
65
}
76

87
jar {

0 commit comments

Comments
 (0)