Compile common stdlib tests against common stdlib

Declare platform-specific test utilities as expect.
This commit is contained in:
Ilya Gorbunov
2017-12-22 15:34:26 +03:00
parent c030a047aa
commit ecd42f14b3
7 changed files with 84 additions and 13 deletions
+18 -1
View File
@@ -4,7 +4,8 @@ apply plugin: 'kotlin-platform-common'
configurePublishing(project)
ext.commonSrcDir = "${buildDir}/common-sources"
def commonSrcDir = "${buildDir}/common-sources"
def commonTestSrcDir = "${buildDir}/common-test-sources"
sourceSets {
main {
@@ -13,9 +14,21 @@ sourceSets {
srcDir commonSrcDir
}
}
test {
kotlin {
srcDir commonTestSrcDir
srcDir 'test'
}
}
}
dependencies {
testCompile project(":kotlin-test:kotlin-test-common")
testCompile project(":kotlin-test:kotlin-test-annotations-common")
}
createPreprocessorTask(project, "Main", "${projectDir}/../src/kotlin", commonSrcDir)
createPreprocessorTask(project, "Test", "${projectDir}/../test", commonTestSrcDir)
compileKotlinCommon {
dependsOn preprocessSourcesMain
@@ -34,6 +47,10 @@ compileKotlinCommon {
}
*/
compileTestKotlinCommon {
dependsOn preprocessSourcesTest
}
kotlin.experimental.coroutines 'enable'
jar {