Skip to content

Commit

Permalink
Moving the FlowAdapters into the core jar as a solution to #424
Browse files Browse the repository at this point in the history
  • Loading branch information
viktorklang committed May 2, 2018
1 parent 582fdae commit e2d52e5
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 28 deletions.
18 changes: 18 additions & 0 deletions api/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
description = "reactive-streams"
def jdkFlow = false
try {
Class.forName("java.util.concurrent.Flow")
jdkFlow = true
} catch (ClassNotFoundException cnfe) {

}

sourceSets {
main {
java {
if (jdkFlow)
srcDirs = ['src/main/java', 'src/main/java9']
else
srcDirs = ['src/main/java']
}
}
}

jar {
manifest {
Expand Down
3 changes: 1 addition & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ subprojects {
if (name in ["reactive-streams",
"reactive-streams-tck",
"reactive-streams-tck-flow",
"reactive-streams-examples",
"reactive-streams-flow-adapters"]) {
"reactive-streams-examples"]) {
apply plugin: "maven"
apply plugin: "signing"

Expand Down
1 change: 0 additions & 1 deletion flow-adapters/.gitignore

This file was deleted.

20 changes: 0 additions & 20 deletions flow-adapters/build.gradle

This file was deleted.

6 changes: 2 additions & 4 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ try {
Class.forName("java.util.concurrent.Flow")
jdkFlow = true
println(ANSI_GREEN + " INFO: ------------------ JDK9 classes detected ---------------------------------" + ANSI_RESET)
println(ANSI_GREEN + " INFO: Java 9 Flow API found; Including [flow-adapters, tck-flow] in build. " + ANSI_RESET)
println(ANSI_GREEN + " INFO: Java 9 Flow API found; Including [tck-flow] & FlowAdapters in build. " + ANSI_RESET)
println(ANSI_GREEN + " INFO: --------------------------------------------------------------------------" + ANSI_RESET)
} catch (Throwable ex) {
// Flow API not available
println(ANSI_RED + "WARNING: -------------------- JDK9 classes NOT detected -----------------------------" + ANSI_RESET)
println(ANSI_RED + "WARNING: Java 9 Flow API not found; Not including [flow-adapters, tck-flow] in build." + ANSI_RESET)
println(ANSI_RED + "WARNING: Java 9 Flow API not found; Not including [tck-flow] & FlowAdapters in build." + ANSI_RESET)
println(ANSI_RED + "WARNING: In order to execute the complete test-suite run the build using JDK9+. " + ANSI_RESET)
println(ANSI_RED + "WARNING: ----------------------------------------------------------------------------" + ANSI_RESET)
}
Expand All @@ -26,14 +26,12 @@ include ':reactive-streams-tck'
include ':reactive-streams-examples'

if (jdkFlow) {
include ':reactive-streams-flow-adapters'
include ':reactive-streams-tck-flow'
}

project(':reactive-streams').projectDir = "$rootDir/api" as File
project(':reactive-streams-tck').projectDir = "$rootDir/tck" as File
project(':reactive-streams-examples').projectDir = "$rootDir/examples" as File
if (jdkFlow) {
project(':reactive-streams-flow-adapters').projectDir = "$rootDir/flow-adapters" as File
project(':reactive-streams-tck-flow').projectDir = "$rootDir/tck-flow" as File
}
1 change: 0 additions & 1 deletion tck-flow/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ description = 'reactive-streams-tck-flow'
dependencies {
compile group: 'org.testng', name: 'testng', version:'5.14.10'
compile project(':reactive-streams-tck')
compile project(':reactive-streams-flow-adapters')
}

jar {
Expand Down

0 comments on commit e2d52e5

Please sign in to comment.