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 d7e21ac
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 28 deletions.
12 changes: 12 additions & 0 deletions api/build.gradle
@@ -1,5 +1,17 @@
description = "reactive-streams"

try {
Class.forName("java.util.concurrent.Flow")
} catch (ClassNotFoundException cnfe) {
sourceSets {
main {
java {
exclude '**/FlowAdapters.java'
}
}
}
}

jar {
manifest {
attributes('Automatic-Module-Name': 'org.reactivestreams')
Expand Down
3 changes: 1 addition & 2 deletions build.gradle
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
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
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 d7e21ac

Please sign in to comment.