Compile common stdlib tests against common stdlib
Declare platform-specific test utilities as expect.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user