Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving the FlowAdapters into the core jar as a solution to #424 #430

Merged
merged 1 commit into from
May 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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