Roman Elizarov | 1f74a2d | 2018-06-29 19:19:45 +0300 | [diff] [blame] | 1 | /* |
Roman Elizarov | d2f4b2b | 2019-09-02 17:22:39 +0300 | [diff] [blame] | 2 | * Copyright 2016-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. |
Roman Elizarov | 1f74a2d | 2018-06-29 19:19:45 +0300 | [diff] [blame] | 3 | */ |
| 4 | |
Vsevolod Tolstopyatov | 74bcc92 | 2018-05-03 20:07:54 +0300 | [diff] [blame] | 5 | configurations { |
| 6 | testArtifacts |
Roman Elizarov | d2f4b2b | 2019-09-02 17:22:39 +0300 | [diff] [blame] | 7 | configureKotlinJvmPlatform(testArtifacts) |
Vsevolod Tolstopyatov | 74bcc92 | 2018-05-03 20:07:54 +0300 | [diff] [blame] | 8 | } |
| 9 | |
| 10 | dependencies { |
| 11 | compile 'org.ow2.asm:asm-debug-all:5.0.4' |
| 12 | compile 'com.google.code.gson:gson:2.6.2' |
| 13 | |
| 14 | testCompile "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version" |
Alphonse Bendt | 4b0379f | 2018-06-20 00:27:53 +0200 | [diff] [blame] | 15 | |
Vsevolod Tolstopyatov | 74bcc92 | 2018-05-03 20:07:54 +0300 | [diff] [blame] | 16 | testArtifacts project(':kotlinx-coroutines-core') |
Vsevolod Tolstopyatov | 4327b21 | 2018-12-17 19:49:12 +0300 | [diff] [blame] | 17 | testArtifacts project(':kotlinx-coroutines-test') |
Vsevolod Tolstopyatov | c7239ac | 2018-12-10 11:41:00 +0300 | [diff] [blame] | 18 | testArtifacts project(':kotlinx-coroutines-debug') |
Vsevolod Tolstopyatov | 74bcc92 | 2018-05-03 20:07:54 +0300 | [diff] [blame] | 19 | |
| 20 | testArtifacts project(':kotlinx-coroutines-reactive') |
| 21 | testArtifacts project(':kotlinx-coroutines-reactor') |
Vsevolod Tolstopyatov | 74bcc92 | 2018-05-03 20:07:54 +0300 | [diff] [blame] | 22 | testArtifacts project(':kotlinx-coroutines-rx2') |
| 23 | |
| 24 | testArtifacts project(':kotlinx-coroutines-guava') |
| 25 | testArtifacts project(':kotlinx-coroutines-jdk8') |
Alphonse Bendt | 4b0379f | 2018-06-20 00:27:53 +0200 | [diff] [blame] | 26 | testArtifacts project(':kotlinx-coroutines-slf4j') |
Alex Saveau | 118ee99 | 2018-08-30 16:13:47 -0700 | [diff] [blame] | 27 | testArtifacts project(path: ':kotlinx-coroutines-play-services', configuration: 'default') |
Vsevolod Tolstopyatov | 74bcc92 | 2018-05-03 20:07:54 +0300 | [diff] [blame] | 28 | |
| 29 | testArtifacts project(':kotlinx-coroutines-android') |
| 30 | testArtifacts project(':kotlinx-coroutines-javafx') |
| 31 | testArtifacts project(':kotlinx-coroutines-swing') |
| 32 | } |
| 33 | |
| 34 | def testCasesDeclarationsDump = "${buildDir}/visibilities.json".toString() |
| 35 | |
| 36 | compileTestKotlin { |
| 37 | kotlinOptions { |
| 38 | freeCompilerArgs = ["-Xdump-declarations-to=$testCasesDeclarationsDump"] |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | sourceSets { |
| 43 | test { |
| 44 | java { |
Vsevolod Tolstopyatov | e1fa197 | 2018-06-19 15:54:58 +0300 | [diff] [blame] | 45 | srcDir "test/cases" |
Vsevolod Tolstopyatov | 74bcc92 | 2018-05-03 20:07:54 +0300 | [diff] [blame] | 46 | } |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | test { |
Vsevolod Tolstopyatov | 313978c | 2018-06-01 15:30:34 +0300 | [diff] [blame] | 51 | dependsOn cleanCompileTestKotlin |
Vsevolod Tolstopyatov | 74bcc92 | 2018-05-03 20:07:54 +0300 | [diff] [blame] | 52 | dependsOn configurations.testArtifacts |
| 53 | |
| 54 | systemProperty 'testCasesClassesDirs', sourceSets.test.output.classesDirs.asPath |
| 55 | systemProperty 'testCasesDeclarations', testCasesDeclarationsDump |
Roman Elizarov | 9fb5d67 | 2018-05-14 16:17:15 +0300 | [diff] [blame] | 56 | systemProperty 'overwrite.output', project.properties['overwrite.output'] |
Vsevolod Tolstopyatov | 74bcc92 | 2018-05-03 20:07:54 +0300 | [diff] [blame] | 57 | jvmArgs '-ea' |
| 58 | } |