Skip to content

Commit bed6355

Browse files
authored
Kotlin DSL - 'reactive:reactive' (#1946)
1 parent 5caa526 commit bed6355

File tree

2 files changed

+43
-34
lines changed

2 files changed

+43
-34
lines changed

reactive/kotlinx-coroutines-reactive/build.gradle

-34
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
* Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3+
*/
4+
5+
import org.jetbrains.dokka.DokkaConfiguration.ExternalDocumentationLink
6+
import org.jetbrains.dokka.gradle.DokkaTask
7+
import java.net.URL
8+
9+
val reactiveStreamsVersion = property("reactive_streams_version")
10+
11+
dependencies {
12+
compile("org.reactivestreams:reactive-streams:$reactiveStreamsVersion")
13+
testCompile("org.reactivestreams:reactive-streams-tck:$reactiveStreamsVersion")
14+
}
15+
16+
tasks {
17+
val testNG = register<Test>("testNG") {
18+
useTestNG()
19+
reports.html.destination = buildDir.resolve("/reports/testng")
20+
include("**/*ReactiveStreamTckTest.*")
21+
// Skip testNG when tests are filtered with --tests, otherwise it simply fails
22+
onlyIf {
23+
filter.includePatterns.isEmpty()
24+
}
25+
doFirst {
26+
// Classic gradle, nothing works without doFirst
27+
println("TestNG tests: ($includes)")
28+
}
29+
}
30+
31+
named<Test>("test") {
32+
reports.html.destination = buildDir.resolve("/reports/junit")
33+
34+
dependsOn(testNG)
35+
}
36+
37+
withType<DokkaTask>().configureEach {
38+
externalDocumentationLink(delegateClosureOf<ExternalDocumentationLink.Builder> {
39+
url = URL("https://www.reactive-streams.org/reactive-streams-$reactiveStreamsVersion-javadoc/")
40+
packageListUrl = projectDir.toPath().resolve("package.list").toUri().toURL()
41+
})
42+
}
43+
}

0 commit comments

Comments
 (0)