1/* 2 * Copyright 2016-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. 3 */ 4import org.jetbrains.dokka.gradle.DokkaTaskPartial 5 6targetCompatibility = JavaVersion.VERSION_1_8 7 8dependencies { 9 api project(':kotlinx-coroutines-reactive') 10 testImplementation project(':kotlinx-coroutines-reactive').sourceSets.test.output 11 testImplementation "org.reactivestreams:reactive-streams-tck:$reactive_streams_version" 12 api "io.reactivex.rxjava3:rxjava:$rxjava3_version" 13} 14 15compileTestKotlin { 16 kotlinOptions.jvmTarget = "1.8" 17} 18 19compileKotlin { 20 kotlinOptions.jvmTarget = "1.8" 21} 22 23tasks.withType(DokkaTaskPartial.class) { 24 dokkaSourceSets.configureEach { 25 externalDocumentationLink { 26 url.set(new URL('http://reactivex.io/RxJava/3.x/javadoc/')) 27 packageListUrl.set(projectDir.toPath().resolve("package.list").toUri().toURL()) 28 } 29 } 30} 31 32task testNG(type: Test) { 33 useTestNG() 34 reports.html.destination = file("$buildDir/reports/testng") 35 include '**/*ReactiveStreamTckTest.*' 36 // Skip testNG when tests are filtered with --tests, otherwise it simply fails 37 onlyIf { 38 filter.includePatterns.isEmpty() 39 } 40 doFirst { 41 // Classic gradle, nothing works without doFirst 42 println "TestNG tests: ($includes)" 43 } 44} 45 46test { 47 dependsOn(testNG) 48 reports.html.destination = file("$buildDir/reports/junit") 49} 50